Packageorg.apache.flex.binding
Classpublic class ConstantBinding
InheritanceConstantBinding Inheritance Object
Implements IBead, IDocument

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

The ConstantBinding class is lightweight data-binding class that is optimized for simple assignments of one object's constant to another object's property.



Public Properties
 PropertyDefined By
  destinationPropertyName : String
The name of the property on the strand that is set when the source property changes.
ConstantBinding
  sourceID : String
If not null, the id of the mxml tag who's property is being watched for changes.
ConstantBinding
  sourcePropertyName : String
If not null, the name of a property on the mxml document that is being watched for changes.
ConstantBinding
  strand : IStrand
[write-only] The host component for this bead.
ConstantBinding
Protected Properties
 PropertyDefined By
  destination : Object
The destination object.
ConstantBinding
  document : Object
The host mxml document for the source and destination objects.
ConstantBinding
  source : Object
The source object who's property has the value we want.
ConstantBinding
Public Methods
 MethodDefined By
  
Constructor.
ConstantBinding
  
setDocument(document:Object, id:String = null):void
This method is called to notify an instance of what MXML document it belongs to, if any, and what its assigned id is in that document, if any.
ConstantBinding
Property Detail
destinationproperty
protected var destination:Object

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

The destination object. It is always the same as the strand. ConstantBindings are attached to the strand of the destination object.

destinationPropertyNameproperty 
public var destinationPropertyName: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 on the strand that is set when the source property changes.

documentproperty 
protected var document:Object

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

The host mxml document for the source and destination objects. The source object is either this document for simple bindings like {foo} where foo is a property on the mxml documnet, or found as document[sourceID] for simple bindings like {someid.someproperty}

sourceproperty 
protected var source:Object

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

The source object who's property has the value we want.

sourceIDproperty 
public var sourceID:String

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

If not null, the id of the mxml tag who's property is being watched for changes.

sourcePropertyNameproperty 
public var sourcePropertyName:String

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

If not null, the name of a property on the mxml document that is being watched for changes.

strandproperty 
strand:IStrand  [write-only]

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

The host component for this bead.


Implementation
    public function set strand(value:IStrand):void
Constructor Detail
ConstantBinding()Constructor
public function ConstantBinding()

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

Constructor.

Method Detail
setDocument()method
public function setDocument(document:Object, id:String = null):void

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

This method is called to notify an instance of what MXML document it belongs to, if any, and what its assigned id is in that document, if any.

Parameters

document:Object — The MXML document that hosts this component.
 
id:String (default = null) — The optional id of the component in the document.