Entries in programming (1)
Actionscript 3.0 Duh! moment
I’ve recently had the pleasure of writing some Actionscript 3.0 code for the Flex 3 platform.
Actionscript has some interesting properties (like the dynamic directive to create classes that allow monkey patching mid-flight..)
It also has C# style implicit getters and setters to hide functions behind properties. Not sure if it’s always a good thing, but anyway.
One error message took me ages to understand: Error: Attempted access of inaccessible method get through a reference with static type Class.
That’s what you get when you out of habit tuck a few parentheses at the end of your getter,
var a:ClassA = ClassA.get();when it really should be
var a:ClassA = ClassA.get;
So, watch out for those habitual parentheses at the end. Severe Duh! warning for old time Java programmers.


