Home Tutorial Flex Flex4 Flex ArrayCollection

 
 

Share on Google+Share on Google+
Flex ArrayCollection
Posted on: April 19, 2010 at 12:00 AM
Advertisement
ArrayCollection provides more functionalities than an Array.
ArrayCollection provides more functionalities than an Array. It provides methods like addItem(), addItemAt(), contains(), getItemIndex(), removeAll() etc which makes ArrayCollection more useful rather than using Array. It also supports change listener that listens when arraycollection is updated. Listeners can be added to listen the event.

// Creates ArrayCollection of 0 elements
var myArrayCollection:ArrayCollection = new ArrayCollection();



// Creates ArrayCollection using existing Array
var myArrayCollection:ArrayCollection = new ArrayCollection(myArray);



// Creates ArrayCollection and assigns values
var myArrayCollection: ArrayCollection = new ArrayCollection(["RoseIndia", 10]);

Advertisement

Related Tags for Flex ArrayCollection:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 19, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com