I don't know if Cairgorm is anything like PureMVC but if you have a
reference to the UIComponent that you want to dispatch the event, you
would so something like this:
MXML:
[Event(name="rowSelected", type="mx.events.DynamicEvent")]
Then, in AS:
var myComponent:MyComponent;
my
In case this helps anyone else - I got this to work.
Had to reference the moduleLoader through the application - so when I
dispatch the dynamicEvent from inside the CairgormCommand's execute
method it looks like this:
initCompleteEvent = new DynamicEvent("initCompleted",true);
Application.applica
Thanks Nate,
Tried that but it still doesn't work. I'm basically trying to
dispatch a dynamicEvent from a Cairngorm event and then trying to get
a module to listen for that event. I don't want this event to be a
CiarngormEvent to be handled by the FrontController and the Command
object. In othe
Events don't bubble by default.
So if you're depending on the Cairngorm Front Controller to pick them up,
and the object dispatching the event isn't directly below the Application,
you need to enable event bubbling.
new DynamicEvent("myType", true);
Cheers,
Nate
On Mon, Jan 12, 2009 at 11:48 AM,
Well, I want to dispatch the dynamicEvent from the actionscript class
(which is a Cairngorm command) and I want my module to listen for that
event.
Since the module event handler code is not being hit, I thought I
might need to register this event with the compiler (perhaps my
terminology is wro
What do you mean by "register"? Do you want to listen for that event
or dispatch one?
--- In flexcoders@yahoogroups.com, "flexcoder2008" wrote:
>
> I have seen numerous examples of registering a dynamicEvent in a
> component's mxml such as:
>
> [Event (name="rowSelected", type="mx.events.Dynami
Hmmm, this is the way I have done it - but my event handler is not firing.
I am dispatching my DynamicEvent from a Cairngorm command - in the
execute method I have:
var evt:DynamicEvent = new DynamicEvent("initCompleted");
dispatchEvent(evt);
in my module's creationComplete handler I have this
7 matches
Mail list logo