Package | com.asfusion.mate.core |
Class | public class SmartObject |
Inheritance | SmartObject flash.utils.Proxy |
Implements | flash.events.IEventDispatcher, ISmartObject |
IActionList
.
These objects expose temporary data such as the current event,
the value returned by a MethodInvoker
or the result of a server call.
Property | Defined 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 |
Property | Defined by | ||
---|---|---|---|
chain : Array = null
A list of properties that has been accessed using the dot operator.
| SmartObject |
Method | Defined 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 | ||
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 |
Method | Defined by | ||
---|---|---|---|
getProperty(name:*):*
Overrides any request for a property's value.
| SmartObject |
chain | property |
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]
source | property |
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
sourceKey | property |
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
SmartObject | () | constructor |
public function SmartObject(source:String = null, key:String = null, chain:Array = null)
Constructor
Parameterssource:String (default = null )
|
|
key:String (default = null )
|
|
chain:Array (default = null )
|
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.
Parameterstype: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.
Parametersevent:Event |
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.
Parametersname:* |
* |
getValue | () | method |
public function getValue(scope:IScope, debugCall:Boolean = false):Object
This method returns the real value of the SmartObject
scope:IScope |
|
debugCall:Boolean (default = false )
|
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.
type:String |
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.
Parameterstype:String |
|
listener:Function |
|
useCapture:Boolean (default = false )
|
toString | () | method |
public function toString():String
Returns the string representation of the specified object.
ReturnsString |
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.
type:String |
Boolean |