See the modules presentation on my blog.  You'll need to define the singleton 
or at least its interface and related types in the main app or a shared-code 
module.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of Everson Alves
Sent: Saturday, August 15, 2009 9:47 PM
To: [email protected]; [email protected]
Subject: [flexcoders] Re: Singletons and Modules - Application domain problem



I tried removing the option to optimize the module but the problem persists. 
Any idea?
On Sat, Aug 15, 2009 at 1:11 PM, Everson Alves 
<[email protected]<mailto:[email protected]>> wrote:
Hello guys,

I'm facing a weird problem. I'm working with flex Modules that are tide mxml 
components . Using ModuleManager to load the modules. If I load using 
moduleInfo.load(ApplicationDomain.currentDomain) it loads fine but as I want to 
use the module as independent sub applications and they use the same class 
definitions that doens't play nice with singletons (ModelLocator) . When 
loading using  moduleInfo.load() expecting that it uses it's own 
ApplicationDomain it loads, dispatches ModuleEvent.READY event but 
moduleEvent.module.factory.create() gives me null. I also tried 
moduleInfo.load(new ApplicationDomain(ApplicationDomain.currentDomain)) but 
this case dispatches a ModuleEvent.ERROR saying that file isn't a loadable 
module or something like that. An detail that might be important is that the 
module is marked to be optimized to my application in compilation.

thanks in advance.

--
Jhonny Everson



--
Jhonny Everson

Reply via email to