i, need some help from the event guru.
I have several view states, each of them contain custom component,
which is subscribed to listen to my custom GenEvent.
When I click the button and change the view state, the components on
that state don't get the event!
private function onSidesChange():void{
switch(sides.value){
case 1:
currentState='';
break;
case 2:
currentState="2sides";
break;
default:
currentState="3sides";
break;
}
dispatchEvent(new GenEvent(config,GenEvent.TYPE));
}
It looks like the problem is that the components are not ready at the
moment the event is dispatched.. If I pass the event manually, like
with button click it works. What can be the workaround?
I tried to dispatch event in creationComplete handler of the parent
container (that is common for all 3 states), but it doesn't work. The
only solution I came up with is to put creationComplete handler inside
each container on the view state(but I have lots of them, which is ugly).




Reply via email to