ColdFusion Struct References

You need to be careful with references to objects or structs. I was looking at some old code the other day and I noticed I hadn't var'ed some local variables - very naughty of me. So I fixed the code but it no longer worked.

[More]

Flash Date Errors

Flash has a lot of functions for creating and setting dates but you have to be careful using them. In fact it may be safer not to use them at all.

Consider this action script:

view plain print about
1var birthdate:Date = new Date();
2birthdate.setDay(17);
3birthdate.setMonth(7);
4birthdate.setDay(1969);
Will this always set the date to be 17th July 1969?

[More]

Flash Instance Names - spot the error

Say we have a simple flash file with an instance of a symbol on the stage (like a rectangle). The rectangle has an instance name and we want to change or display it's properties via action script.

Here's a screen shot of the stage and the instance properties.

[More]

ColdFusion CGI variables and Spiders

What's wrong with this bit of code?

view plain print about
1<cfset languages = CGI.HTTP_ACCEPT_LANGUAGE>

Well nothing as long as the page is viewed with a browser. However a cgi variable in your code may not exist if a spider rather than a browser looks at your site. This includes spiders like google. Your site may not be indexed by search engines if you don't handle CGI variables correctly.

[More]