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
| Name | Type | Optional | Default | Descripton |
sName | String | The name of this action | ||
fHandler | Function | The handler function to call at the end of execution |
Properties
| Name | Type | get | set | Descripton |
async | Boolean | ![]() | ![]() | Whether to perform this action asynchronously. |
children | Array | ![]() | Children of this Action. Children can be any derivate of BiAction or BiReference. | |
handler | Function | ![]() | ![]() | The 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 |
handlerStatements | String | ![]() | The action handler statements. | |
scope | Object | ![]() | ![]() | The scope to run the handler function in. I.e. what "this" is inside the function |
threadConstructor | | ![]() | ![]() | The thread constructor to use for this type of action@default BiActionThread |
Methods
| Name | Description |
createThread | This method creates an executable thread from the action definition |
exec | Trigger this Action. |
Events
| Name | Type | Bubbles | Descripton |
completed | | This event is dispatched when the action is completed. | |
exec | | This event is dispatched when the action is executed. |
Static Methods
| Name | Description |
createHandlerFunction | Static 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
| Name | Type | Optional | Default | Descripton |
oScope | Object | The scope this action should be executed in. | ||
nType | Number | ![]() | The (optional) type of the thread. |
Return Type
exec
Trigger this Action.
Syntax
object.exec ( oEvent [ ,oScope ] ) Parameters
| Name | Type | Optional | Default | Descripton |
oEvent | | The event that triggered this call. | ||
oScope | Object | ![]() | The (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
| Name | Type | Optional | Default | Descripton |
sHandler | String | The function body for use in the handler |
Return Type
Function
