I have two related ComboBoxes (continents and countries). When the ComboBox continents change, I request XML from a specific URL. When I get this XML, I change the DataProvider for ComboBox countries, for example:
public function displayCountryArray( items:XMLList ):void
{
this.resellersCountryLoader.alpha = 0;
this.resellersCountry.dataProvider = items;
this.resellersCountry.dispatchEvent( new ListEvent( ListEvent.CHANGE ) );
}
I am sending ListEvent.CHANGE because I use it to change another ComboBox, so please ignore this (and 1st line).
So my problem is this: I select "ASIA" from the first continents, and then the list message is updated (I see this because the first ITEM element is an element labeled "23 countries"). I click on combos and then I see countries.
NOW, I select "Africa", the first item is displayed when the ComboBox closes, and then when I click on it, the countries still remain in Asia. In any case, if I clicked an item in the list, then the list will be updated correctly, and it will also have the correct information (as I said, this affects other ComboBoxes). The only problem is that the display list is not updated.
In this function I tried these approaches
Convert XMLList to XMLCollection and even ArrayCollection
Adding this.resellersCountry.invalidateDisplayList ();
Triggering events like DATA_CHANGE and UPDATE_COMPLETE I know that they don't make much sense, but I am a bit desperate.
Please note that when I used the 3.0.0 SDK, this did not happen.
Sorry if I'm stupid, but flexibility events are killing me.