bindable arraycollection

<?xml version="1.0"?><!-- binding/ArrayBinding.mxml --><application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"><layout><verticallayout></verticallayout></layout><script></script><!-- Data binding updated at application startup and when myAC modified. --><label id="text1" text="{myAC[0]}"></label> <!-- Data binding updated at application startup, when myAC modified, and when myAC[0] modified. --> <label id="text2" text="{myAC.getItemAt(0)}"></label> <button id="button1" label="Change Element" click="myAC[0]='new One'"></button> <button id="button2" label="Change ArrayCollection" click="myAC=myAC2"></button> </application> button1 只会对在getItemAt()时起到绑定的作用

你可能感兴趣的:(xml,Flex,Adobe)