Mediator is created after view is added with addChild(). Is this normal ?

vishwas.gagrani's Avatar

vishwas.gagrani

01 Jun, 2012 12:43 PM

I am seeing my viewMediator is instantiating after view is added ( with addChild) . I expected viewMediator to instantiate after view gets instantiated ( no matter it's added or not ). Should i recheck my code ?

  1. 1 Posted by Stray on 01 Jun, 2012 12:52 PM

    Stray's Avatar

    The automatic creation of mediators is triggered by views being added to stage, not by their being created (think about it - how could the system know that you have new Thing()ed?

    Your code is correct, you're just a bit unclear about what the mediatorMap is intended to do.

    Stray

  2. vishwas.gagrani closed this discussion on 01 Jun, 2012 01:30 PM.

  3. vishwas.gagrani re-opened this discussion on 01 Jun, 2012 01:30 PM

  4. vishwas.gagrani closed this discussion on 01 Jun, 2012 01:30 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