robotlegs / robotlegs-framework

An ActionScript 3 application framework for Flash and Flex
https://robotlegs.tenderapp.com/
MIT License
966 stars 261 forks source link

How to handle a moment when command, mediators completed with an event processing? #98

Closed Kalinovych closed 11 years ago

Kalinovych commented 11 years ago

Hi, I need to know and to do some action when all commands wired with some event executed and all mediators subscribed to the event completed with it handling. Is there any way to do it?

darscan commented 11 years ago

Not directly within the framework itself. If you are dispatching the event yourself you can be sure that all processing will have taken place by the next line though.

Kalinovych commented 11 years ago

So you mean I need to send 2 messages each time like it: dispatch(new DataEvent(DataEvent.DATA_UPDATED)); dispatch(new SomeEvent(SomeEvent.DO_SOMETHING_AFTER_DATA_UPDATE_PROCESSED));

darscan commented 11 years ago

Or you could add a listener with a really low priority - that will ensure that it only gets called at the very end.

darscan commented 11 years ago

I'm going to close this ticket for now. Feel free to create a new ticket for any other issues.