Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Flex ChangeWatcher.watch
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


bikrantsingh
ChangeWatcher.watch
1 Answer(s)      4 years and 2 months ago
Posted in : Flex


HI.....

Please tell me about
What's the difference between ChangeWatcher.watch, and bindingUtils.bindProperty?

please give the example of each property

Thanks

Advertisement
View Answers

October 15, 2010 at 6:49 PM


<p>Ans:<br>
ChangeWatcher: The ChangeWatcher class watches for change an object. Note that
the properties that can be watched by the ChangeWatcher must be bindable - hence
the connection to binding. There is another static function on ChangeWatcher
that is worth a mention, it is watch. This is the bread and butter function of
the class.<br>
ChangeWatcher.watch(myCoolObject, &quot;coolProperty&quot;,function(e:Event):void { trace(e.target);
})<br>
<br>
bindingutils.bindproperty: To achieve simple data-binding in an application, it
is often enough to mark the target variables as &quot;bindable&quot;. However, if these
variables are member variables of a class that you&#39;ve instantiated, we must do
more than simply mark them as &quot;bindable&quot;. We must use the bindProperty()
function provided by the BindingUtils class.<br>
BindingUtils.bindProperty(dogNameText, &quot;text&quot;, myDog, &quot;name&quot;);<br>
</p>


Related Tutorials/Questions & Answers:
ChangeWatcher.watch
ChangeWatcher.watch  HI..... Please tell me about What's the difference between ChangeWatcher.watch, and bindingUtils.bindProperty? please.... ChangeWatcher.watch(myCoolObject, "coolProperty",function(e:Event):void
Advertisements
 

 

 

DMCA.com