Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
PropertyWatcher

Package | org.apache.flex.binding
Class | public class PropertyWatcher
Inheritance | PropertyWatcher WatcherBase 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
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | allowedErrors : Array [static] Certain errors are normal when executing an update, so we swallow them. | WatcherBase
|  | allowedErrorTypes : 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
|  | value : Object The value of whatever it is we are watching. | WatcherBase

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | children : Array Children of this watcher are watching sub values. | WatcherBase
|  | listeners : Array The binding objects that are listening to this Watcher. | WatcherBase

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | PropertyWatcher(source:Object, propertyName:String, eventNames:Object, getterFunction:Function) Constructor. | PropertyWatcher
|  | addBinding(binding:GenericBinding):void Add a binding to this watcher, meaning that the binding is notified when our value changes. | WatcherBase
|  | addChild(child:WatcherBase):void Add a child to this watcher, meaning that the child is watching a sub value of ours. | WatcherBase
|  | notifyListeners():void Notify the various bindings that the value has changed so they can update their data binding expressions. | WatcherBase
|  | parentChanged(parent:Object):void This is an abstract method that subclasses implement. | WatcherBase
|  | updateChildren():void This method is called when the value might have changed and goes through and makes sure the children are updated. | WatcherBase

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | changeHandler(event:Event):void The event handler that gets called when the change events are dispatched. | PropertyWatcher
|  | wrapUpdate(wrappedFunction:Function):void Calls a function inside a try catch block to try to update the value. | WatcherBase

Property Detail

eventNames | property

`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.

getterFunction | property |

`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.

propertyName | property |

`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.

source | property |

`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.

Mon Sep 5 2016, 07:19 AM -07:00