Arrays don't have event dispatchers so when you change the array no event is 
dispatched to let the bound variable know about it.

Change your array to an array collection...

userlist = new ArrayCollection(ArrayUtil.toArray(event.result));

--- In flexcoders@yahoogroups.com, "trefalgar" <trefal...@...> wrote:
>
> I searched the forum and Google unsuccessfully to see if someone else 
> reported this problem and I came up empty. A while back I posted about 
> questions with AsyncTokens and it was suggested I update my SDK within Flex, 
> I updated to 3.5 from the default Flex SDK version. Since that time, I've had 
> random issues with any app I've rebuilt/updated and pushed out with this new 
> SDK. 
> 
> The problem is simple, I have a bindable variable defined as an Array, with 
> data being pushed into it:
> 
> userlist = ArrayUtil.toArray(event.result);
> 
> Within the MXML, the definition is pretty straight forward as well:
> 
> <mx:ComboBox id="userbox" dataProvider="{userlist}" labelField="username" 
> prompt=" - Select User - " x="10" y="40"/>
> 
> The problem is, the combobox is never updated with the data. I can throw in 
> debug or trace userlist, and the data is there. This isn't a problem if I 
> compile the application with the older version of the SDK. My only 
> workaround, that I've found, is to set the dataProvider directly, instead of 
> populating the bindable variable:
> 
> userbox.dataProvider = ArrayUtil.toArray(event.result);
> 
> Has anyone else seen this? Was I just doing it the "wrong way" the first 
> time, and it just happened to work?
> 
> Thanks in advance.
>


Reply via email to