| Package | system.process |
| Class | public class BindTask |
| Inheritance | BindTask Task Object |
Example :
import core.dump ;
import system.process.Action ;
import system.process.Bind ;
var finish:Function = function( action:Action ):void
{
trace ( "finish" ) ;
}
var start:Function = function( action:Action ):void
{
trace ( "start" ) ;
}
var execute:Function = function( ...args:Array ):void
{
trace ( this + " execute " + dump(arguments) ) ;
}
var scope:Object =
{
toString : function():String
{
return "scope" ;
}
};
var wrapper:BindTask = new BindTask( execute, scope , "hello world" ) ;
wrapper.startIt.connect( start ) ;
wrapper.finishIt.connect( finish ) ;
wrapper.run() ;
See also
| Property | Defined By | ||
|---|---|---|---|
| args : Array
The array of all optionals arguments to inject in the method when is executed. | BindTask | ||
![]() | finishIt : Signaler
This signal emit when the notifyFinished method is invoked. | Task | |
![]() | logger : Logger
Determinates the internal Logger reference of this Loggable object. | Task | |
| method : Function
The method to execute. | BindTask | ||
![]() | phase : String [read-only]
The current phase of the action. | Task | |
![]() | running : Boolean [read-only]
Indicates true if the process is in progress. | Task | |
| scope : *
The scope reference of the function to execute. | BindTask | ||
![]() | startIt : Signaler
This signal emit when the notifyStarted method is invoked. | Task | |
| Method | Defined By | ||
|---|---|---|---|
BindTask(method:Function, scope:*, ... arguments)
Creates a new BindTask instance. | BindTask | ||
clone():* [override]
Returns a shallow copy of this object. | BindTask | ||
![]() | isLocked():Boolean
Returns true if the object is locked. | Task | |
![]() | lock():void
Locks the object. | Task | |
![]() | notifyFinished():void
Notify an ActionEvent when the process is finished. | Task | |
![]() | notifyStarted():void
Notify an ActionEvent when the process is started. | Task | |
run(... arguments):void [override]
Run the process. | BindTask | ||
![]() | unlock():void
Unlocks the display. | Task | |
| args | property |
public var args:ArrayThe array of all optionals arguments to inject in the method when is executed.
| method | property |
public var method:FunctionThe method to execute.
| scope | property |
public var scope:*The scope reference of the function to execute.
| BindTask | () | Constructor |
public function BindTask(method:Function, scope:*, ... arguments)Creates a new BindTask instance.
Parametersmethod:Function — The method invoked in this process.
| |
scope:* (default = NaN) — The scope of method to execute.
| |
... arguments — The optional argument to inject in the method.
|
| clone | () | method |
override public function clone():*Returns a shallow copy of this object.
Returns* — a shallow copy of this object.
|
| run | () | method |
override public function run(... arguments):voidRun the process.
Parameters
... arguments |