Hi,
This is a very strange behavior and I don't know if someone can help
me to resolve this.
On the first load of the application, I select an item in a mx:Tree
which is triggering a function which is populating a combobox from a
RemoteObject call. The result of the call give me back the selected
value to display.
Now here is the catch: the value is coming back from the server but
the combobox is not showing the selected value until a click again
the Tree item...than it works fine! Worst than that, I have it
working perfectly on my Windows 2000 Server but failed on Windows
2003 Server.
Here is the code that is chosing the right selection in the combobox:
var aDP:Array = mx.utils.ArrayUtil.toArray(myCombobox.dataProvider);
var sDataValueInit:String = iniVal.myValue;
var sDataValueCur:String;
for ( var i:Number=0; i<aDP.length; i++ ) { //loop
over the items in the dataProvider
sDataValueCur = aDP[i].data; //get the
current item.data value
if ( sDataValueCur == sDataValueInit )
{ //compare desired value to current item.data value
myCombo.selectedIndex = i; //set the
seletedIndex of the combo box
}
}