Package | mx.binding.utils |
Class | public class BindingUtils |
Inheritance | BindingUtils ![]() |
Method | Defined By | ||
---|---|---|---|
bindProperty(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher
[static]
Binds a public property, prop on the site
Object, to a bindable property or property chain.
| BindingUtils | ||
[static]
Binds a setter function, setter, to a bindable property
or property chain.
| BindingUtils | ||
![]() |
Indicates whether an object has a specified property defined.
| Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter.
| Object | |
![]() |
Indicates whether the specified property exists and is enumerable.
| Object | |
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object |
bindProperty | () | method |
public static function bindProperty(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher
Binds a public property, prop
on the site
Object, to a bindable property or property chain.
If a ChangeWatcher instance is successfully created, prop
is initialized to the current value of chain
.
Parameters
site:Object — The Object defining the property to be bound
to chain .
|
|
prop:String — The name of the public property defined in the
site Object to be bound.
The property will receive the current value of chain ,
when the value of chain changes.
|
|
host:Object — The object that hosts the property or property chain
to be watched.
|
|
chain:Object — A value specifying the property or chain to be watched.
Legal values are:
Note: The property or properties named in the |
|
commitOnly:Boolean (default = false ) — Set to true if the handler
should be called only on committing change events;
set to false if the handler should be called
on both committing and non-committing change events.
Note: the presence of non-committing change events for a property
is indicated by the [NonCommittingChangeEvent(<event-name>)]
metadata tag.
Typically these tags are used to indicate fine-grained value changes,
such as modifications in a text field prior to confirmation.
|
ChangeWatcher — A ChangeWatcher instance, if at least one property name has
been specified to the chain argument; null otherwise.
|
bindSetter | () | method |
public static function bindSetter(setter:Function, host:Object, chain:Object, commitOnly:Boolean = false):ChangeWatcher
Binds a setter function, setter
, to a bindable property
or property chain.
If a ChangeWatcher instance is successfully created,
the setter function is invoked with current value of chain
.
Parameters
setter:Function — Setter method to invoke with an argument of the current
value of chain when that value changes.
|
|
host:Object — The host of the property.
See the bindProperty() method for more information.
|
|
chain:Object — The name of the property, or property chain.
See the bindProperty() method for more information.
|
|
commitOnly:Boolean (default = false ) — Set to true if the handler should be
called only on committing change events.
See the bindProperty() method for more information.
|
ChangeWatcher — A ChangeWatcher instance, if at least one property name
has been specified to the chain argument; null otherwise.
|