Packageorg.apache.flex.binding
Classpublic class PropertyWatcher
InheritancePropertyWatcher Inheritance WatcherBase Inheritance Object

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The PropertyWatcher class is the data-binding class that watches for changes to various properties in objects.



Public Properties
 PropertyDefined By
 InheritedallowedErrors : Array
[static] Certain errors are normal when executing an update, so we swallow them.
WatcherBase
 InheritedallowedErrorTypes : Array
[static] Certain errors classes are normal when executing an update, so we swallow all errors they represent.
WatcherBase
  eventNames : Object
The name or array of names of events that get dispatched when the property changes.
PropertyWatcher
  getterFunction : Function
A function to call to get the value of the property changes if the property is not public.
PropertyWatcher
  propertyName : String
The name of the property we are watching.
PropertyWatcher
  source : Object
The object who's property we are watching.
PropertyWatcher
 Inheritedvalue : Object
The value of whatever it is we are watching.
WatcherBase
Protected Properties
 PropertyDefined By
 Inheritedchildren : Array
Children of this watcher are watching sub values.
WatcherBase
 Inheritedlisteners : Array
The binding objects that are listening to this Watcher.
WatcherBase
Public Methods
 MethodDefined By
  
PropertyWatcher(source:Object, propertyName:String, eventNames:Object, getterFunction:Function)
Constructor.
PropertyWatcher
 Inherited
Add a binding to this watcher, meaning that the binding is notified when our value changes.
WatcherBase
 Inherited
addChild(child:WatcherBase):void
Add a child to this watcher, meaning that the child is watching a sub value of ours.
WatcherBase
 Inherited
Notify the various bindings that the value has changed so they can update their data binding expressions.
WatcherBase
 Inherited
parentChanged(parent:Object):void
This is an abstract method that subclasses implement.
WatcherBase
 Inherited
This method is called when the value might have changed and goes through and makes sure the children are updated.
WatcherBase
Protected Methods
 MethodDefined By
  
changeHandler(event:Event):void
The event handler that gets called when the change events are dispatched.
PropertyWatcher
 Inherited
wrapUpdate(wrappedFunction:Function):void
Calls a function inside a try catch block to try to update the value.
WatcherBase
Property Detail
eventNamesproperty
public var eventNames:Object

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The name or array of names of events that get dispatched when the property changes.

getterFunctionproperty 
public var getterFunction:Function

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

A function to call to get the value of the property changes if the property is not public.

propertyNameproperty 
public var propertyName:String

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The name of the property we are watching.

sourceproperty 
public var source:Object

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The object who's property we are watching.

Constructor Detail
PropertyWatcher()Constructor
public function PropertyWatcher(source:Object, propertyName:String, eventNames:Object, getterFunction:Function)

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Constructor.

Parameters
source:Object — The object who's property we are watching.
 
propertyName:String — The name of the property we are watching.
 
eventNames:Object — The name or array of names of events that get dispatched when the property changes.
 
getterFunction:Function — A function to call to get the value of the property changes if the property is not public.
Method Detail
changeHandler()method
protected function changeHandler(event:Event):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The event handler that gets called when the change events are dispatched.

Parameters

event:Event — The event that was dispatched to notify of a value change.