Tim,

When i say "the destination view (where command should execute) should be
passed as a parameter.", i didn't mean that command gets executed in the
view. ;)
I meant  that i need to know the component name because the command is gonna
change things in this component (and thus pass it as a param in my dispatch
event). That's why initially it was a view function.

As to "if the function performs some buisness level task, it should be a
command" i'm not sure of this.
In theory, yes.
But in some cases, you will have to update a view by adding or removing
children, or even doing much complex things which are not business
dependant. Things which will require actionscript, and thus a function. And
i don't see how using bindings could resolve all these issues.
Unless you tell me there is a way to trigger a local function by listenning
to data in ModelLocator.

Sorry if this sounds confusing, but as you might have guessed, english is
not my original language.

-JL

----- Original Message -----
From: "Tom Chiverton" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 23, 2006 5:41 PM
Subject: Re: [flexcoders] Re: Newbie : How do i listen to a value ?
Cairngorm inside.


On Tuesday 23 May 2006 16:30, Jean-Luc ESSER wrote:
> 2/ But if it is more complex, i would agree on writing a new command. But
> when dispatching an event from any component, it means that the
> destination
> view (where command should execute) should be passed as a parameter.

Commands don't execute in views. They execute in their own space, and update
things in modelLocator if needed - all you views are binding to modelLocator
for their data, no ?

As to " when does a function in a viewHelper or viewLocator (or MXML file)
merit becoming a command?" I'd say, if the function performs some buisness
level task, it should be a command. Otherwise not.

--
Tom Chiverton

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and
Wales under registered number OC307980 whose registered office address is at
St James's Court Brown Street Manchester M2 2JF.  A list of members is
available for inspection at the registered office. Any reference to a
partner in relation to Halliwells LLP means a member of Halliwells LLP.
Regulated by the Law Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may
be confidential or legally privileged.  If you are not the addressee you
must not read it and must not use any information contained in nor copy it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents.  If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of
the Year at the 2005 Growth Company Awards




--
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










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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to