Tech Per

11 Sep

Flash and Flex APIs Lack in Quality

Coming from long term Java programming, I can see that I have gotten used to very good api design. It is not, that JavaSE and JavaEE doesn’t have their corners of bad api design. But working with flash and flex, I seem to come across strange and bad api design a bit too often.
The other [...]

11 Sep

Are AS3 Number Variables Real Objects or Not?

I am confused. Is the Number class really a class, that I can create instances of and expect to have reference semantics etc. like the rest of the classes in ActionScript3?
Given this AS3 code:

var foo : Number = null;
trace("foo="+foo);

The compiler outputs a warning saying “null used where a Number value was expected“, but it does [...]

22 Jul

AS3 Inconsistency - Unable To Use …(rest) Keyword in Setter

ActionScript3 has the nice feature of a get and set keyword, usable for easily defining properties on classes, while still hiding the actual implementation.
AS3 also has the varargs feature, in the form of the …(rest) keyword. This can be utilized to create methods that take an unspecified number of arguments.
Sadly, I have been unable to [...]

08 Jul

Missing Method Overloading in AS3

While I do like to write UI code in ActionScript3 within the flex framework, I also miss features from Java sometimes. One of those missed features is method overloading, the ability to have several methods with the same name, differing only in input and output types. This is not possible in as3.
Just Use Default Values [...]

26 May

Where is IList.addAll() in AS3/Flex?

Being used to the excellent collection apis of Java, I come to expect that of other platforms too. The Flex platform has the IList interface, which amongst other methods, has the removeAll() method. Sadly, it is missing the addAll(Collection) method, so I am left to do this instead:
coll.removeAll();
var newElements : ArrayCollection = xxx as ArrayCollection;
for [...]

© 2008 Tech Per | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo