Event triggered when mediatorMap is "ready" ?

Palleas's Avatar

Palleas

20 Apr, 2010 10:22 AM

Hi all,

In my application, I have my main UI called "facade" which opens a bunch (2, actually) of popups I have to mediate manually (as I'm using the flex PopupManager), so here is what I do, in my "FacadeMediator" class :

override public function onRegister() : void
{ // .... var map : MapScreen = new MapScreen(); PopUpManager.addPopUp(map, facade); mediatorMap.createMediator(map); }

The problem is, my map is not mediated properly because this onRegister method is called BEFORE.
For now, I'm using a timer : waiting 2 seconds before I open my popups, but that's kinda dirty IMHO.

Any other ideas?

Thanks!

  1. Support Staff 1 Posted by Shaun Smith on 20 Apr, 2010 10:30 AM

    Shaun Smith's Avatar

    Hi Palleas,

    This might be due to a feature whereby the Mediator for the contextView is created immediately (as soon as it is mapped). I would recommend doing the mapping for the contextView as the last step in your startup sequence (ie, after all Command, Service and Mediator mappings).

    Let me know if this solves your issue.

    Cheers,

  2. 2 Posted by Palleas on 20 Apr, 2010 12:29 PM

    Palleas's Avatar

    Yep, it works that's seems a lot more logical too :)

    Thanks!

  3. Stray closed this discussion on 11 Feb, 2011 11:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac