An easier approach than using these events, is to bind the ComboBox 
selectedIndex property to a variable like: [Bindable] public var 
myComboBoxSelectedIndex : int; that lives in the same class as the data array.  
When you get or initialize the array, set the variable to the desired value, 
and the binding will automatically display the correct item in the ComboBox.  
This way, you don't have to worry about timing.  If the ComboBox exists, when 
the variable changes, the selectedItem will change then.  If the ComboBox 
doesn't exists when you set the variable, when the ComboBox is instantiated the 
binding will kick in then. 

-TH

--- In flexcoders@yahoogroups.com, "Ivan" <ivan.ilija...@...> wrote:
>
> I have TabNavigator component with two navigatorContent components.
> At the beginning I'm focused on first tab and on another tab I have combobox.
> 
> ComboBox uses Array data provider that is populated with initialize event 
> handler on Application component.
> 
> When I click on first tab, I initialize event which goes on another tab and I 
> want my combobox to show specific item from ComboBox.
> 
> My problem is:
> In first attempt my combobox does not display desired option, but this thing 
> happens only if I hadn't displayed second tab. If I click first on the second 
> tab, then go back on first one and click on it to create desired event, 
> everything works just fine.
> 
> I tried to use creationPolicy on TabNavigator and NavigatorContent, but no 
> use.
> 
> Does anyone has any idea?
>


Reply via email to