Created
June 13, 2009 15:19
-
-
Save lukesh/129284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" | |
creationComplete="handleCreationComplete(event)" | |
> | |
<mx:Script> | |
<![CDATA[ | |
import mx.collections.ArrayCollection; | |
[Bindable] | |
public var arrayCollection:ArrayCollection; | |
[Bindable] | |
public var primitiveArray:Array; | |
private function handleCreationComplete(event:Event):void { | |
arrayCollection = new ArrayCollection(); | |
primitiveArray = []; | |
for (var i:uint = 0; i < 10; i++) { | |
arrayCollection.addItem("testing " + i.toString()); | |
primitiveArray.push("testing " + i.toString()); | |
if (i == 4 || i == 8) { | |
arrayCollection.addItem("something"); | |
primitiveArray.push("something"); | |
} | |
} | |
} | |
]]> | |
</mx:Script> | |
<mx:HBox> | |
<mx:List width="100" height="300" dataProvider="{primitiveArray}" /> | |
<mx:List width="100" height="300" dataProvider="{arrayCollection}" /> | |
</mx:HBox> | |
</mx:Application> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment