ChangeWatcher.watch

ChangeWatcher.watch

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, &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

Ads