I already had read it, about 2 years ago, right? It's very good. I read
again now to check if forgot something in these 2 years. I guess not;

Maybe I didn't explain correctly. In fact I want to have multiple Singleton,
that might sound weird but each module needs to run as an independent
application. I want to load more than once each module.

For example:

ModuleAModelLocator.getInstance.shoppingCart should differ from
ModuleAModelLocator.getInstance.shoppingCart loaded a second time in a
different ApplicationDomain. Is that possible?


On Sun, Aug 16, 2009 at 3:04 AM, Alex Harui <[email protected]> wrote:

>
>
>  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]>
> 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
>
>
>
> 
>



-- 
Jhonny Everson

Reply via email to