Home Answers Viewqa Flex ChangeWatcher.watch

 
 


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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.