Hello,
I have a modular Flex application. My application has an applicationContext.xml and each module has its own moduleContext.xml.
When initializing the application I set the modulePolicy to ignore:
FlexStageProcessorRegistry.getInstance().modulePol icy = ModulePolicy.IGNORE;
My modules extend from BasicSASModule. Once the module is added to the stage all components that are added to the module component correctly get autowired from the moduleContext.xml.
Now, the thing that's giving me problems is that my module contains some dialogs. When I display those, I do not add them to the module component, but to the application:
PopUpManager.addPopUp(myDialog, Application.application as DisplayObject);
When the dialog gets autowired, it only looks for object definitions in applicationContext.xml and fails to load anything that's configured in moduleContext.xml. I can work around this by configuring everything in applicationContext.xml, but that kinda beats the purpose of using modules.
So my question (phew, almost there): Is there a better way to deal with this? Should I add some boiler plate code to autowire the dialog myself using the appropriate context?
Thanks for your help,
Glenn


Reply With Quote
