Packagecom.asfusion.mate.core
Classpublic class SmartObject
InheritanceSmartObject Inheritance flash.utils.Proxy
Implementsflash.events.IEventDispatcher, ISmartObject

The Smart Objects can be used within the IActionList. These objects expose temporary data such as the current event, the value returned by a MethodInvoker or the result of a server call.



Public Properties
 PropertyDefined by
  source : String
This is a string that refer to the name of the source that will be used in the method getValue.
SmartObject
  sourceKey : String
This is the name of the property that getValue will try to read in the source object.
SmartObject
Protected Properties
 PropertyDefined by
  chain : Array = null
A list of properties that has been accessed using the dot operator.
SmartObject
Public Methods
 MethodDefined by
  
SmartObject(source:String = null, key:String = null, chain:Array = null)
Constructor
SmartObject
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
SmartObject
  
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
SmartObject
  
getValue(scope:IScope, debugCall:Boolean = false):Object
This method returns the real value of the SmartObject
SmartObject
  
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
SmartObject
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
SmartObject
  
toString():String
Returns the string representation of the specified object.
SmartObject
  
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
SmartObject
Protected Methods
 MethodDefined by
  
getProperty(name:*):*
Overrides any request for a property's value.
SmartObject
Property detail
chainproperty
protected var chain:Array = null

A list of properties that has been accessed using the dot operator. For example, if you a access an inner property like this: myObject.property1.property2, the chain is equivalent to an array with 2 items [property1,property2]

sourceproperty 
source:String  [read-write]

This is a string that refer to the name of the source that will be used in the method getValue. The possible values are:

This property can be used as the source for data binding.

Implementation
    public function get source():String
    public function set source(value:String):void
sourceKeyproperty 
sourceKey:String  [read-write]

This is the name of the property that getValue will try to read in the source object.

This property can be used as the source for data binding.

Implementation
    public function get sourceKey():String
    public function set sourceKey(value:String):void
Constructor detail
SmartObject()constructor
public function SmartObject(source:String = null, key:String = null, chain:Array = null)

Constructor

Parameters
source:String (default = null)
 
key:String (default = null)
 
chain:Array (default = null)
Method detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void

Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. You can register event listeners on all nodes in the display list for a specific type of event, phase, and priority.

Parameters
type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
weakRef:Boolean (default = false)
dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Dispatches an event into the event flow. The event target is the EventDispatcher object upon which dispatchEvent() is called.

Parameters
event:Event

Returns
Boolean
getProperty()method 
flash_proxy override function getProperty(name:*):*

Overrides any request for a property's value. If the property can't be found, the method returns undefined. For more information on this behavior, see the ECMA-262 Language Specification, 3rd Edition, section 8.6.2.1.

Parameters
name:*

Returns
*
getValue()method 
public function getValue(scope:IScope, debugCall:Boolean = false):Object

This method returns the real value of the SmartObject

Parameters
scope:IScope
 
debugCall:Boolean (default = false)

Returns
Object
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Checks whether the EventDispatcher object has any listeners registered for a specific type of event. This allows you to determine where an EventDispatcher object has altered handling of an event type in the event flow hierarchy. To determine whether a specific event type will actually trigger an event listener, use IEventDispatcher.willTrigger().

The difference between hasEventListener() and willTrigger() is that hasEventListener() examines only the object to which it belongs, whereas willTrigger() examines the entire event flow for the event specified by the type parameter.

Parameters
type:String

Returns
Boolean
removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Removes a listener from the EventDispatcher object. If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.

Parameters
type:String
 
listener:Function
 
useCapture:Boolean (default = false)
toString()method 
public function toString():String

Returns the string representation of the specified object.

Returns
String
willTrigger()method 
public function willTrigger(type:String):Boolean

Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. This method returns true if an event listener is triggered during any phase of the event flow when an event of the specified type is dispatched to this EventDispatcher object or any of its descendants.

The difference between hasEventListener() and willTrigger() is that hasEventListener() examines only the object to which it belongs, whereas willTrigger() examines the entire event flow for the event specified by the type parameter.

Parameters
type:String

Returns
Boolean