I always put the event name into the class - cairngorm event, or any event. I don't know why anyone wouldn't. This way around you can't have mismatched event class names (well not easily) and you have only one place to go to maintain your event.
Paul ----- Original Message ----- From: Fernando Ghisi To: flexcoders@yahoogroups.com Sent: Monday, February 25, 2008 2:56 PM Subject: Re: [flexcoders] CairngormEvent - Place to put the static variable that stores the name of the event I like this approaching too but, as a begginer with Cairngorm, when I see the basic examples (like http://www.cairngormdocs.org/tools/CairngormDiagramExplorer.html) putting this in the FrontController, I stay in doubt about if there is a pattern or a best way to do this. 2008/2/25, Scott Melby <[EMAIL PROTECTED]>: Don't know about "best", but I always put it in the event class itself. I like that is results in the call to AddCommand having both the event class and the command class explicitly referenced as shown below. addCommand(GetSomeDataEvent.GET_SOME_DATA_EVENT, GetSomeDataCommand); hth Scott Scott MelbyFounder, Fast Lane Software LLChttp://www.fastlanesw.com Fernando Ghisi wrote: Where is the best place to put the static variable that stores the name of an event, in the class of this event (extends CairngormEvent) or in the class that extends FrontController and consumes this event? There are many examples with both ways... -- Fernando Ghisi -- Fernando Benedet Ghisi