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.application.myModuleLoader.child.dispatchEvent(initCompleteEvent);
--- In [email protected], "flexcoder2008" <djohnso...@...> wrote:
>
> 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 wrong - sorry). I know that when using a component,
> you use the [Event] metadata tag to announce that the component
> dispatches a particular event. I thought that I might have to do the
> same thing with an actionscript class.
>
>
>
> --- In [email protected], "kylewburke" <monkeys@> wrote:
> >
> > What do you mean by "register"? Do you want to listen for that event
> > or dispatch one?
> >
> > --- In [email protected], "flexcoder2008" <djohnson29@>
wrote:
> > >
> > > I have seen numerous examples of registering a dynamicEvent in a
> > > component's mxml such as:
> > >
> > > [Event (name="rowSelected", type="mx.events.DynamicEvent")]
> > >
> > > If I have an actionscript class that dispatches a dynamicEvent, what
> > > is the syntax for this?
> > >
> > > I want to dispatch a dynamicEvent from an actionscript class, and I
> > > want my module to listen for that event.
> > >
> >
>