Re: [flexcoders] Re: I've got a [Bindable] boolean var - can I setup a eventlistener on it?

2009-11-23 Thread Ninh Hieu

In this situation, the easiest way is using ChangeWatcher.watch function to 
watch that variable.

--- On Sat, 11/21/09, jamesfin james.alan.finni...@gmail.com wrote:

From: jamesfin james.alan.finni...@gmail.com
Subject: [flexcoders] Re: I've got a [Bindable] boolean var - can I setup a 
eventlistener on it?
To: flexcoders@yahoogroups.com
Date: Saturday, November 21, 2009, 6:22 AM







 



  



  
  
  

This should get you on your way...



http://livedocs. adobe.com/ flex/3/html/ help.html? content=databind ing_4.html



--- In flexcod...@yahoogro ups.com, luvfotography ygro...@...  wrote:



 I've declared a [Bindable] private var changeme:Boolean;

 

 Is there a way to execute a function whenever this var changes?

 

 thanks,








 





 



  






  

[flexcoders] Re: I've got a [Bindable] boolean var - can I setup a eventlistener on it?

2009-11-23 Thread turbo_vb
Even easier, would be to change the var to a getter/setter, and execute the 
function in the setter.

-TH

--- In flexcoders@yahoogroups.com, Christopher McArthur cmcart...@... wrote:

 assuming your in the same class as changeme:
 
 private var changemeWatcher:ChangeWatcher;
 
 this.changemeWatcher = ChangeWatcher.watch(this, changeme, 
 changemeChangedFunction);
 
 this function will get called every time it changes:
 private function changemeChangedFunction(event:PropertyChangeEvent):void
 
 when you are done, make sure to uregister it with
 this.changemeWatcher.unwatch();
 
 __
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of luvfotography
 Sent: Friday, November 20, 2009 3:02 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] I've got a [Bindable] boolean var - can I setup a 
 eventlistener on it?
 
   
 I've declared a [Bindable] private var changeme:Boolean;
 
 Is there a way to execute a function whenever this var changes?
 
 thanks,





[flexcoders] Re: I've got a [Bindable] boolean var - can I setup a eventlistener on it?

2009-11-20 Thread jamesfin

This should get you on your way...

http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_4.html



--- In flexcoders@yahoogroups.com, luvfotography ygro...@... wrote:

 I've declared a [Bindable] private var changeme:Boolean;
 
 Is there a way to execute a function whenever this var changes?
 
 thanks,