Hello,
I have a:
- Container with two states ( "" and "editing")
- A view (LocaleEditor.mxml) that is shown when the container changes
to the state "editing":
<mx:states>
<mx:State name="editing" >
<mx:RemoveChild target="{listaDeLocales}"/>
<mx:AddChild relativeTo="{gestorDeLinguas}"
position="lastChild">
<ns1:LocaleEditor id="localeEditor"/>
</mx:AddChild>
</mx:State>
</mx:states>
I need my view to execute some code when it is shown
(myTextBox.setFocus() ). I have tried the creationComplete event, but
the view is only created on the first time the state changes, the next
times this event is not dispatched. I have tried the AddedToStage, but
it throws a runtime error with the myTextBox.setFocus() code . I have
tried the "show" event, but it simply doesn't work.
Which event should I rely on to execute the "myTextBox.setFocus()"
when the user sees the view?
Thanks,
João Saleiro