robotlegs / robotlegs-framework

An ActionScript 3 application framework for Flash and Flex
https://robotlegs.tenderapp.com/
MIT License
967 stars 261 forks source link

can't send and receive event to/from other module when using PopupManager to addPopup( module ) #155

Closed foodyi closed 10 years ago

foodyi commented 10 years ago
           var ml:ModuleLoader = new ModuleLoader();
            ml.applicationDomain = ApplicationDomain.currentDomain;
            ml.url = "modules/popup/view/PopupModuleView1.swf";
            ml.loadModule();

            PopUpManager.addPopUp( ml,FlexGlobals.topLevelApplication as DisplayObject );
            PopUpManager.centerPopUp( ml );

when using PopupManager to add module to stage, the module can't send and receive Event to/from other modules.

when using addElement instead of PopupManager , it will be OK.

Ondina commented 10 years ago

That's not a robotlegs issue :)

You need the ViewManager for popups.

See these:

http://knowledge.robotlegs.org/discussions/robotlegs-2/3319-modules-in-a-popup-or-should-i-say-popup-modules#comment_27412738

https://github.com/Ondina/robotlegs-bender-modular-air/blob/master/src/modulesAndPopups/shell/views/mediators/ModulesCenterMediator.as#L38

https://github.com/Ondina/robotlegs-bender-modular-air

If you still have questions, our forum is a better place to get answers:

http://knowledge.robotlegs.org/discussions/robotlegs-2