Thank you both, this offered further insight into this problem.  I like the watch idea because it keeps it simple and literally watches the variable(s).  But I do see its limitations.

-- Matthew

On 4/19/05, Darron J. Schall <[EMAIL PROTECTED]> wrote:

Joe Berkovitz wrote:

>I don't recommend using watch() as Darron suggested, because you can
>only have one user of watch() per watched object property.  It's better
>to do what MXML bindings do and listen for change events.
>
>
The problem is you can only get change events in certain situations.  If
I have a variable x and I want to know when it changes, I can't say
x.addEventListener("modelChanged") because it doesn't exist in any data
provider.  Not all changes to variables generate change events, which is
why we use watch.  Watch is the way to catch changes to any variable.

Yes, you can only have 1 watch per variable, but you can work around
that by having 1 "master" watch that triggers other listeners...

-d


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/




Yahoo! Groups Links

Reply via email to