philipSe
|
|
« Reply #1 on: March 02, 2009, 03:48:41 » |
|
In your application startup, I assume the StartupResourceLoadedCommand is registered before your mediators are registered; this means that a notification will trigger the command before the mediators.
Note that processing is single-threaded, so when a notification is handled by the first interested party, that handling runs to completion before the next interested party gets to handle the original notification.
1. Proxy sends notification "data loaded" now all interested parties are actioned in sequence
2. First the SM command StartupResourceLoadedCommand is triggered which causes SM to send "loading complete" notification and this is picked up and reported by your mediator(s)
3. Next your interested mediators are triggered and report the "data loaded" notification.
This is normal with PureMVC. Since we don't typically worry much about the strict sequence in which we register commands and mediators, we can't make assumptions about the sequence in which notification handlers will be executed. You could choose to have 2 notifications, A and B; proxy sends A and this is picked up by mediators, proxy sends B and this triggers the StartupResourceLoaded Command.
----Philip
|