I've posted a very simple program below. And it doesn't work as I thought it
should. Simply - I want to be able to bind a dynamic array to the link bar.
When I run this - I got the linkbar with no TEST 1 showing. I'm sure this is a
silly problem - 101, right?
Thanks for your advice!
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init();">
<mx:Script>
<![CDATA[
[Bindable] private var aLanguage:Array = new Array();
private function init():void{
aLanguage.push("Test 1");
}
]]>
</mx:Script>
<mx:Canvas>
<mx:LinkBar id="tbbLanguage" dataProvider="{aLanguage}" width="294"
color="#ffffff" backgroundColor="#000000"/>
</mx:Canvas>
</mx:Application>
The issue is that Array objects aren't don't trigger binding execution
when they are changed. You'll need to use an ArrayCollection instead
(or trigger the binding execution manually).
cheers,
barneyb
----- Excess quoted text cut - see Original Post for more -----