ChangeWatcher.watch 1 Answer(s) 2 years and 7 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
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, "coolProperty",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 "bindable". However, if these variables are member variables of a class that you've instantiated, we must do more than simply mark them as "bindable". We must use the bindProperty() function provided by the BindingUtils class.<br> BindingUtils.bindProperty(dogNameText, "text", myDog, "name");<br> </p>
Related Pages:
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