-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Description
So I've been doing a lot of multiple mediation recently (which is really cool). Just tagging a whole lot of view objects with interfaces to give it lots of new functionality/abilities.
But when doing so a lot, I've had a couple of cases where mediators need to run a particular order.
You've made a cool initialize and destroy order.
preInitialize
initialize
postInitialize
preDestroy
destroy
postDestroy
But when mediating a view with 2 mediators. The order isn't what I expected to happen. I wanted to make sure code was run a particular mediator before another one.
Here is the current order:
Mediator A - preInitialize
Mediator A - initialize
Mediator A - postInitialize
Mediator B - preInitialize
Mediator B - initialize
Mediator B - postInitialize
Mediator A - preDestroy
Mediator A - destroy
Mediator A - postDestroy
Mediator B - preDestroy
Mediator B - destroy
Mediator B - postDestroy
Can I change it like so:
Mediator A - preInitialize
Mediator B - preInitialize
Mediator A - initialize
Mediator B - initialize
Mediator A - postInitialize
Mediator B - postInitialize
Mediator A - preDestroy
Mediator B - preDestroy
Mediator A - destroy
Mediator B - destroy
Mediator A - postDestroy
Mediator B - postDestroy
I'm working on the code now, but wanted to make sure there wasn't a reason for the previous method.
Metadata
Metadata
Assignees
Labels
No labels