The frontcontroller doesn't map events to commands but strings like
WidgetController.EVENT_ADD_WIDGET to commands. So any event with a
type set to WidgetController.EVENT_ADD_WIDGET, which reaches the
frontcontroller, triggers the command, which is bound to the string
WidgetController.EVENT_ADD_WIDGET.

Cheers,
Ralf.

On 8/30/06, lostinrecursion <[EMAIL PROTECTED]> wrote:
> This approach seems like it could be extremely useful for me as I am
> starting to build a lot of larger projects, but I have a quick comment.
>
> Forgive me if I am off base here, but is there a mistake in the code
> example? I am new to Cairngorm so bear with me for a moment.
>
> According to your example, you call the event like so:
>
> CODE
> ---
> var addEvent : WidgetEvent = new
> WidgetEvent(WidgetController.EVENT_ADD_WIDGET, widgetVO);
> dispatchEvent(addEvent);
> ---
>
> But, in the Controller, the EVENT_ADD_WIDGET constant, in keeping with
> Cairngorm practice, equates to the following string: "addWidget"
>
> So, my question is this, if the WidgetEvent expects a parameter of
> commandName, which in this case would be "addWidgetCommand" (Again,
> assuming you are using best practice), then how does the application
> call the correct command?
>
> Is it because the FrontController automatically maps Events to
> Commands? I'm a little confused.
>
> -K
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to