ooops, maybe that should be ChangeWatcher.
Apologies, I've just got off a 14 hour overnight flight in cattle class I'm 
afraid!


-----Original Message-----
From: [email protected] on behalf of Jim Hayes
Sent: Tue 11/3/2009 12:29 PM
To: [email protected]
Subject: RE: [flexcoders] dispatchEvent
 
is it Watcher that you're looking for? 
something along these lines :
(warning - straight off the top of my head so could well be wrong in detail at 
least. best check the docs)

private function addWatcher():void
{
    
Watcher.watch(yourModelInstance,"yourModelProperty",onYourModelPropertyChanged);
}

private function onYourModelPropertyChanged(changeEvent:ChangeEvent)
{
    trace(changeEvent.newValue);
    //make and despatch your event here
}

I expect there are other ways to it as well..


-----Original Message-----
From: [email protected] on behalf of Darrin Kay
Sent: Tue 11/3/2009 10:51 AM
To: [email protected]
Subject: [flexcoders] dispatchEvent
 
ok all i want to do is add a eventListner to a variable, so when it changes
value I kick off a event.......  why is it so damm hard?  I am using
cairngorn, and the variable is in the model scope.  But I can not for the
life of me figure how to get the dispatch / addeventlister to work and where
it goes and what packages need to be added


this is the last step I need to get done for a release any help would be
sweet



______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
______________________________________________________________________

<<winmail.dat>>

Reply via email to