简体   繁体   中英

Flex 3 - ActionScript - Cairngorm DispatchEvents - How to know it's complete

I'm using flex 3 with cairngorm framework. At some point in my program i dispatch an event, like this:

CairngormEventDispatcher.getInstance().dispatchEvent(new eventExample [...]

is there some way to know when that event have executed 100%?

because i have other stuff after that, using the return of this event, like an arrayCollection of items that came from the database. But it is comming as null at the first time, when i execute again it comes filled.

Please, tell me if you need some more information..

I have discover myself the solution.. To know how events in flex is complete it could be done by using "addEventListener" but in my case, when i'm dispatching an CairngormEvent and the application go to the backend to get some data, the listener won't work. So, for those who use that framework, are familiar with the "Command.as" file. In that file, there is a function called "result". At that point, the application has already gone to the backend(database) and the array is filled properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM