Hi guys,

I need some help with Cairngorm + Modules:

All my modules are subclass of ReservaWebBaseModule , so I'm using:

[Frame(factoryClass="mx.core.FlexModuleFactory")]
public class ReservaWebBaseModule extends TitleWindow

So far so good, no problem to load it neither to manage my modules. The
problem comes when I try to use the cairngorm in my modules (my shell is
very simple and does not need cairngorm).

I created a event do unload my modules, that event it dispatched from
my*ReservaWebBaseModule class, that is the parent class of all my
modules
*. Even using Modular classes, that was supposed to solve the problem (
http://blog.arc90.com/2007/10/introducing_modular.php), my event is
"catched"(by FrontController) more than once.

*I have a frontController for each module*(each frontController is subclass
of ModuleFrontController) and my UnloadModuleEvent is subclass of
AbstractModuleEvent

Another important point that I noticed is:

Part of the solution proposed is to create a single instance of
CairngormEventDispatcher for each module, instead of create just one for
entire application, here a snnipet of the code:

var instance:Object = ModuleManager.getAssociatedFactory(obj);

Based on instance.name a class creates a single instance "for each module".
I did a trace in my instance.name and noticed that both modules that I'm
using (different classes, but subclass of ReservaWebBaseModule) are with the
same instance.name.

I tried to put this metatag in each subclass of my main module class but the
problem persists. Do I need to create my own subclass of
mx.core.FlexModuleFactory to make what I want ?

Suggestions are welcome

Thanks in advance


-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/

Reply via email to