BiAction

This class represents an Action.

This class extends BiEventTarget and therefore all methods and fields available for BiEventTarget are also available for BiAction .

Constructor

new BiAction ( sName,fHandler )

Parameters

NameTypeOptionalDefaultDescripton
sNameStringThe name of this action
fHandlerFunctionThe handler function to call at the end of execution

Properties

NameTypegetsetDescripton
asyncBooleancheckedcheckedWhether to perform this action asynchronously.
childrenArraycheckedChildren of this Action. Children can be any derivate of BiAction or BiReference.
handlerFunctioncheckedcheckedThe function to be invoked by the end of execution of this action. A handler function can be either of type Function, BiAction or String. See BiActionThread processHandler for details
handlerStatementsStringcheckedThe action handler statements.
scopeObjectcheckedcheckedThe scope to run the handler function in. I.e. what "this" is inside the function
threadConstructorBiAbstractActionThreadcheckedcheckedThe thread constructor to use for this type of action@default BiActionThread

Methods

NameDescription
createThreadThis method creates an executable thread from the action definition
execTrigger this Action.

Events

NameTypeBubblesDescripton
completedBiEventThis event is dispatched when the action is completed.
execBiEventThis event is dispatched when the action is executed.

Static Methods

NameDescription
createHandlerFunctionStatic method to create an event listener handler function.

Static Fields

None.

Remarks

None.

Method Details

createThread

This method creates an executable thread from the action definition

Syntax

object.createThread ( oScope [ ,nType ] )

Parameters

NameTypeOptionalDefaultDescripton
oScopeObjectThe scope this action should be executed in.
nTypeNumbercheckedThe (optional) type of the thread.

Return Type

BiActionThread

exec

Trigger this Action.

Syntax

object.exec ( oEvent [ ,oScope ] )

Parameters

NameTypeOptionalDefaultDescripton
oEventBiEventThe event that triggered this call.
oScopeObjectcheckedThe (optional) scope that this action should be run in.

Return Type

Object

Static Method Details

createHandlerFunction

Static method to create an event listener handler function.

Syntax

BiAction . createHandlerFunction ( sHandler )

Parameters

NameTypeOptionalDefaultDescripton
sHandlerStringThe function body for use in the handler

Return Type

Function