Robotlegs 2 Popup Question

Rick's Avatar


28 Mar, 2012 04:37 AM

I've read and tried to follow suit with what's discussed in and have not had any good fortune.

Might there be any more suggestions on how to get a Flex Popup window to find its mediator in Robotlegs 2? I am using the most recent version that Shaun updated a day or two ago.


  1. Support Staff 1 Posted by Shaun Smith on 28 Mar, 2012 12:36 PM

    Shaun Smith's Avatar

    Hello Rick,

    I got the order wrong in my example on that page. Did you try it the other way around (adding the popup to the ViewManager before adding it to the PopUpManager):

    [Inject] public var viewManager:IViewManager;
    // .. //
    var popup:TestPopupWindow = new TestPopupWindow();
    PopUpManager.addPopUp(popup, FlexGlobals.topLevelApplication as DisplayObject);

    If that doesn't help try setting your context's log level to Debug and seeing if you can spot anything odd in the logs.

    Otherwise, could you explain your setup a little more?

  2. 2 Posted by Rick on 28 Mar, 2012 01:26 PM

    Rick's Avatar

    I have tried the order switch. No luck. Let me try the context debug and

  3. 3 Posted by Rick on 28 Mar, 2012 03:47 PM

    Rick's Avatar

    Apologies...emailed that while on the road to the airport.

    The Debug is spitting out:
    [trace] 2202 DEBUG Context-0-98 StageSyncExtension-4-4a - Context view is now on stage. Initializing context... [trace] 2203 INFO Context-0-98 Context-0-98 - Initializing... [trace] 2204 DEBUG Context-0-98 ModularityExtension-3-33 - Modular context configured to inherit. Broadcasting existence event... [trace] 2205 DEBUG Context-0-98 ModularityExtension-3-33 - Modular context configured to export. Listening for existence events... [trace] 2206 DEBUG Context-0-98 ConfigManager-1-a8 - Context initializing. Instantiating config class [class ContextViewListenerConfig] [trace] 2211 INFO Context-0-98 Context-0-98 - Initialize complete

    When I click the ui controls (tabs, buttons, etc.) we get feedback from the debugger. When I click a button that opens up the popup...nothing.

    I've tried a few different ways to implement this. Which causes me to wonder if I'm not placing the code in the correct place. I will post an example on github and share the link here.

    Regarding your question about how I have things set up...

    I've used [email blocked] Cafe Townsend as a base for getting things wired up. From there I'm injecting the IViewManager into a view (which returns null) and issuing buttons click method to open the window.

    Guessing that's the wrong way. So I tried dispatching an event that's matched with a command that pops up the window and no mediation.

    I'll post an example.

    Thanks for you help with this.

  4. 4 Posted by Rick on 28 Mar, 2012 07:13 PM

    Rick's Avatar
  5. Support Staff 5 Posted by Shaun Smith on 28 Mar, 2012 08:09 PM

    Shaun Smith's Avatar

    Cool. I'll take a look at this shortly and let you know what I find.

  6. Support Staff 6 Posted by Shaun Smith on 29 Mar, 2012 02:46 AM

    Shaun Smith's Avatar

    I ran through and fixed a number of things (sorry, I screwed the formatting a bit by mistake):

    And then.. found a bug (or missing feature) in the RL2 StageObserver:

    You'll need to grab the latest code and build another SWC.

  7. 7 Posted by Rick on 29 Mar, 2012 03:22 AM

    Rick's Avatar

    Thanks very much for your help with this. I'll give it a go and report back tomorrow.

    This is just--awesome.

  8. 8 Posted by Rick on 29 Mar, 2012 12:16 PM

    Rick's Avatar

    Works like a charm and cleared up a bunch of questions for me. Thank you for the extra time you put into this. Very much appreciated.

    If there is anything I can do to help the robotlegs team please let me know.

    I'm going to close this as this is now not an issue or challenge ;)

  9. Rick closed this discussion on 29 Mar, 2012 12:16 PM.

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

Keyboard shortcuts


? 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