{ "type": "class", | |
"qname": "mx.binding.utils.BindingUtils", | |
"baseClassname": "" | |
, | |
"description": "The BindingUtils class defines utility methods for performing data binding from ActionScript. You can use the methods defined in this class to configure data bindings.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "bindProperty", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Binds a public property, <code>prop</code> on the <code>site</code> Object, to a bindable property or property chain. If a ChangeWatcher instance is successfully created, <code>prop</code> is initialized to the current value of <code>chain</code>. to <code>chain</code>. <code>site</code> Object to be bound. The property will receive the current value of <code>chain</code>, when the value of <code>chain</code> changes. to be watched. The <code>host</code> maintains a list of <code>sites</code> to update when <code>prop</code> changes. Legal values are: <ul> <li>String containing the name of a public bindable property of the host object.</li> <li>An Object in the form: <code>{ name: <i>property name</i>, getter: function(host) { return host[<i>property name</i>] } }</code>. This Object must contain the name of, and a getter function for, a public bindable property of the host object.</li> <li>A non-empty Array containing a combination of the first two options that represents a chain of bindable properties accessible from the host. For example, to bind the property <code>host.a.b.c</code>, call the method as: <code>bindProperty(site, prop, host, ["a","b","c"])</code>.</li> </ul> <p>Note: The property or properties named in the <code>chain</code> argument must be public, because the <code>describeType()</code> method suppresses all information about non-public properties, including the bindability metadata that ChangeWatcher scans to find the change events that are exposed for a given property. However, the getter function supplied when using the <code>{ name, getter }</code> argument form described above can be used to associate an arbitrary computed value with the named (public) property.</p> should be called only on committing change events; set to <code>false</code> 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 <code>[NonCommittingChangeEvent(<event-name>)]</code> metadata tag. Typically these tags are used to indicate fine-grained value changes, such as modifications in a text field prior to confirmation. is strong or weak. A strong reference (the default) prevents <code>site</code> from being garbage-collected. A weak reference does not. Added for Flex 4. been specified to the <code>chain</code> argument; null otherwise.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["site The Object defining the property to be bound", "prop The name of the public property defined in the", "host The object that hosts the property or property chain", "chain A value specifying the property or chain to be watched.", "commitOnly Set to <code>true</code> if the handler", "useWeakReference Determines whether the reference to <code>site</code>"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["A ChangeWatcher instance, if at least one property name has"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "mx.binding.utils.ChangeWatcher", | |
"params": [{ "name": "site", "type": "Object"}, | |
{ "name": "prop", "type": "String"}, | |
{ "name": "host", "type": "Object"}, | |
{ "name": "chain", "type": "Object"}]} | |
, | |
{ "type": "method", | |
"qname": "bindSetter", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Binds a setter function, <code>setter</code>, to a bindable property or property chain. If a ChangeWatcher instance is successfully created, the setter function is invoked. The setter must have the following function signature: <pre>\\n function mySetterFunction(object:Object):void {\\n //Do whatever you want with the value of the bound property.\\n }</pre> <p>where <code>object</code> contains the current value of <code>chain</code>.</p> value of <code>chain</code> when that value changes. See the <code>bindProperty()</code> method for more information. The <code>host</code> maintains a list of <code>setters</code> to update when <code>prop</code> changes. See the <code>bindProperty()</code> method for more information. called only on committing change events. See the <code>bindProperty()</code> method for more information. is strong or weak. A strong reference (the default) prevents <code>setter</code> from being garbage-collected. A weak reference does not. Added for Flex 4. has been specified to the <code>chain</code> argument; null otherwise.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["setter Setter method to invoke with an argument of the current", "host The host of the property.", "chain The name of the property, or property chain.", "commitOnly Set to <code>true</code> if the handler should be", "useWeakReference Determines whether the reference to <code>setter</code>"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["A ChangeWatcher instance, if at least one property name"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "mx.binding.utils.ChangeWatcher", | |
"params": [{ "name": "setter", "type": "Function"}, | |
{ "name": "host", "type": "Object"}, | |
{ "name": "chain", "type": "Object"}]} | |
] | |
} |