Referencia de ActionScript® 3.0 para la plataforma de Adobe® Flash®
Inicio  |  Ocultar lista de paquetes y clases |  Paquetes  |  Clases  |  Novedades  |  Índice  |  Apéndices  |  ¿Por qué hay texto en inglés?
Filtros: Recuperando datos del servidor...
Recuperando datos del servidor...
mx.binding.utils 

BindingUtils  - AS3 Flex

Paquetemx.binding.utils
Clasepublic class BindingUtils
HerenciaBindingUtils Inheritance Object

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

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.

Más ejemplos



Propiedades públicas
 PropiedadDefinido por
 Inheritedconstructor : Object
Una referencia a la clase de objeto o función constructora para una instancia de objeto determinada.
Object
Métodos públicos
 MétodoDefinido por
  
bindProperty(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false, useWeakReference:Boolean = false):ChangeWatcher
[estática] Binds a public property, prop on the site Object, to a bindable property or property chain.
BindingUtils
  
bindSetter(setter:Function, host:Object, chain:Object, commitOnly:Boolean = false, useWeakReference:Boolean = false):ChangeWatcher
[estática] Binds a setter function, setter, to a bindable property or property chain.
BindingUtils
 Inherited
Indica si un objeto tiene definida una propiedad especificada.
Object
 Inherited
Indica si hay una instancia de la clase Object en la cadena de prototipo del objeto especificado como parámetro.
Object
 Inherited
Indica si existe la propiedad especificada y si es enumerable.
Object
 Inherited
Establece la disponibilidad de una propiedad dinámica para operaciones de bucle.
Object
 Inherited
Devuelve la representación de cadena de este objeto, con formato según las convenciones específicas de configuración regional.
Object
 Inherited
Devuelve la representación de cadena del objeto especificado.
Object
 Inherited
Devuelve el valor simple del objeto especificado.
Object
Información sobre métodos

bindProperty

()método
public static function bindProperty(site:Object, prop:String, host:Object, chain:Object, commitOnly:Boolean = false, useWeakReference:Boolean = false):ChangeWatcher

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

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.

Parámetros

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. The host maintains a list of sites to update when prop changes.
 
chain:Object — A value specifying the property or chain to be watched. Legal values are:
  • String containing the name of a public bindable property of the host object.
  • An Object in the form: { name: property name, getter: function(host) { return host[property name] } }. This Object must contain the name of, and a getter function for, a public bindable property of the host object.
  • 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 host.a.b.c, call the method as: bindProperty(site, prop, host, ["a","b","c"]).

Note: The property or properties named in the chain argument must be public, because the describeType() 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 { name, getter } argument form described above can be used to associate an arbitrary computed value with the named (public) property.

 
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.
 
useWeakReference:Boolean (default = false) — Determines whether the reference to site is strong or weak. A strong reference (the default) prevents site from being garbage-collected. A weak reference does not. Added for Flex 4.

Valor devuelto
ChangeWatcher — A ChangeWatcher instance, if at least one property name has been specified to the chain argument; null otherwise.

bindSetter

()método 
public static function bindSetter(setter:Function, host:Object, chain:Object, commitOnly:Boolean = false, useWeakReference:Boolean = false):ChangeWatcher

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Binds a setter function, setter, 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:

      function mySetterFunction(object:Object):void {
          //Do whatever you want with the value of the bound property.
      }

where object contains the current value of chain.

Parámetros

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. The host maintains a list of setters to update when prop changes.
 
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.
 
useWeakReference:Boolean (default = false) — Determines whether the reference to setter is strong or weak. A strong reference (the default) prevents setter from being garbage-collected. A weak reference does not. Added for Flex 4.

Valor devuelto
ChangeWatcher — A ChangeWatcher instance, if at least one property name has been specified to the chain argument; null otherwise.




[ X ]¿Por qué hay texto en inglés?
Cierto contenido de la Referencia de ActionScript 3.0 se muestra en inglés

No todo el contenido de la Referencia de ActionScript 3.0 se traduce a todos los idiomas. Si un elemento del lenguaje no se traduce, aparecerá en inglés. Por ejemplo, la clase ga.controls.HelpBox no está traducida en ningún idioma. Por lo tanto, en la versión en español de la referencia, la clase ga.controls.HelpBox aparecerá en inglés.