Nope, this won't work. 

Next call creates new instances which don't correspond to the
instances from the first call.
You have to loop through the dataProvider, find the corresponding item
(by label, id, whatever) and say 
Combo.selectedItem = ArrayCollection(Combo.dataProvider).getItemAt(i)

this will work.

Cheers,
Dmitri.



> I have a combobox with a dataprovider of an arraycollection that is
> returned from a MySQL database. This is populated on creationcomplete.
> Once this arrayCollection is populated I make another call to get
> specific data. Part of this data is a field that corresponds to an
> item in the combobox.
> 
> When the second call returns, all I do is:
> 
> platformComboBox.selectedItem = SDActionItem.platform;
> 
> SDActionItem is the DTO returned from the second call and platform is
> one of it's fields that correspond to an item in the combobox.
> 
> This works every time and I do not have to loop through the data
provider.
> 
> Are you telling me that this should not work?




Reply via email to