| Package | andromeda.process |
| Class | public class ActionProxy |
| Inheritance | ActionProxy SimpleAction CoreEventDispatcher CoreObject |
| Subclasses | InitProcess |
IAction object run a proxy method.
import andromeda.events.ActionEvent ;
import andromeda.process.ActionProxy ;
var debug:Function = function( e:ActionEvent ):void
{
trace ( e ) ;
}
var test:Function = function( ...args:Array ):void
{
trace( this + " test : " + args ) ;
}
var o:Object = {} ;
o.toString = function():String
{
return "myObject" ;
}
var ap:ActionProxy = new ActionProxy( o, test, ["hello world", true] ) ;
trace ( "action proxy : " + ap ) ;
trace ( "action toSource : " + ap.toSource() ) ;
ap.addEventListener( ActionEvent.START , debug ) ;
ap.addEventListener( ActionEvent.FINISH , debug ) ;
ap.run() ; // run the process
// action proxy : [ActionProxy]
// action toSource : new andromeda.process.ActionProxy()
// [ActionEvent type="onStarted" target=[ActionProxy] context=null bubbles=false cancelable=false eventPhase=2]
// myObject test : hello world,true
// [ActionEvent type="onFinished" target=[ActionProxy] context=null bubbles=false cancelable=false eventPhase=2]
| Property | Defined by | ||
|---|---|---|---|
| args : Array
The array representation of the proxy method invoked in this process.
| ActionProxy | ||
![]() | channel : String
Indicates the channel of this dispatcher if this instance is global.
| CoreEventDispatcher | |
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
| method : Function
The proxy method invoked in this process.
| ActionProxy | ||
![]() | running : Boolean
(read-only) Indicates
true if the process is in progress. | SimpleAction | |
| scope : Object
The scope reference of the proxy method of this process.
| ActionProxy | ||
| Method | Defined by | ||
|---|---|---|---|
|
ActionProxy(scope:*, method:Function, args:Array = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new ActionProxy instance.
| ActionProxy | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
| CoreEventDispatcher | |
|
clone():*
Returns a shallow copy of this object.
| ActionProxy | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
![]() |
Returns the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| CoreEventDispatcher | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Creates and returns the internal
EventDispatcher reference (this method is invoked in the constructor). | CoreEventDispatcher | |
![]() |
isLocked():Boolean
Returns
true if the object is locked. | CoreEventDispatcher | |
![]() |
lock():void
Locks the object.
| CoreEventDispatcher | |
![]() |
notifyFinished():void
Notify an ActionEvent when the process is finished.
| SimpleAction | |
![]() |
notifyStarted():void
Notify an ActionEvent when the process is started.
| SimpleAction | |
![]() |
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
| CoreEventDispatcher | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| CoreEventDispatcher | |
|
run(... arguments):void
Run the process.
| ActionProxy | ||
![]() |
setEventDispatcher(e:EventDispatcher):void
Sets the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global
EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher. | CoreEventDispatcher | |
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreEventDispatcher | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
![]() |
unlock():void
Unlocks the display.
| CoreEventDispatcher | |
![]() |
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
| CoreEventDispatcher | |
![]() |
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.
| CoreEventDispatcher | |
| args | property |
public var args:ArrayThe array representation of the proxy method invoked in this process.
| method | property |
public var method:FunctionThe proxy method invoked in this process.
| scope | property |
public var scope:ObjectThe scope reference of the proxy method of this process.
| ActionProxy | () | constructor |
public function ActionProxy(scope:*, method:Function, args:Array = null, bGlobal:Boolean = false, sChannel:String = null)Creates a new ActionProxy instance.
Parametersscope:* — The scope of the proxy method invoked in this process.
|
|
method:Function — The method invoked in this process.
|
|
args:Array (default = null) — The Arguments injected in the method.
|
|
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
|
|
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
|
| clone | () | method |
public override function clone():*Returns a shallow copy of this object.
Returns* — a shallow copy of this object.
|
| run | () | method |
public override function run(... arguments):voidRun the process.
Parameters... arguments |