Imagine, you're relatively new to Flex. You try to create an array of objects. From your Java days, you remember the java.util library contains ArrayList, which fits the bill perfectly. Now, you go to the Flex documentation, mx.collections, expecting to find something similar. The LiveDocs contain nothing, so you try Google, which give the suggestion of using mx.collections.ArrayList.
Hold on, didn't you just read the ActionScript documentation and there was no mention of ArrayList? For fun, you try importing mx.collection.ArrayList, creating an ArrayList, populating it and then print the length of the array.
import mx.collections.ArrayList;
import mx.controls.Alert;
var theList : ArrayList = new ArrayList();
theList.addItem(new Object);
theList.addItem(new Object);
theList.addItem(new Object);
Alert.show(theList.length.toString());
Surprisingly, this compiles and outputs 3 as the expected result, despite the fact there is no documentation to suggest it would work.
Subscribe to:
Post Comments (Atom)
Athiest Spam Bot
I can't say that I am all that keen on the revamped Blogger.
-
Buying a house in Carrigaline or the surrounding area? Well buyer beware, because prices in the area have stalled and in many cases, have fa...
-
Not content with presenting music award shows and presenting their own talk show several times a week, we now get these greasy Podge and Rod...
-
It's at a time like this that I'm reminded of our great statesman, Patrick Bartholomew Ahern . He imparted this bit of wisdom on us ...
3 comments:
Java is for n00bs... manly men use ActionScript. Men programmers don't need no stinkin' docs!
Yerra, whats Actionscript? Perl and Javascript have served me well, why change now? :)
ambrand: ActionScript is the programming language behind Flash and Flex.
Post a Comment