API Documentation for: 1.0.0
Show:

ListTask Class

Extends Task
Defined in: ListTask:12
Namespace: cloudkid

A task that performs a list of tasks

Constructor

ListTask

(
  • id
  • list
  • callback
)

Defined in ListTask:12

Parameters:

  • id String

    Alias for this ListTask

  • list Array

    The list of tasks

  • callback Function

    Function to call when the task is completed

Methods

_onAllTasksComplete

(
  • callback
)
private

Callback for when the whole list is done

Parameters:

  • callback Function

    Callback passed to start()

_onTaskDone

(
  • ev
)
private

Defined in _onTaskDone:120

Callback for when an task is done

Parameters:

cancel

()

Inherited from Task but overwritten in cancel:146

Cancel the TaskManager used for the list of tasks. As the individual tasks are not kept track of, this always returns true.

Returns:

Returns true.

destroy

()

Inherited from Task but overwritten in destroy:168

Don't use after this

done

(
  • result
  • manager
)

Inherited from Task: done:58

Called from the task manager when a Task is finished

Parameters:

  • result Type

    The resulting data from the return

  • manager TaskManager

    The reference to the manager

initialize

(
  • id
  • list
  • callback
)

Inherited from Task but overwritten in initialize:59

Make the list task but don't start.

Parameters:

  • id String

    ID of the task

  • list Array

    List of tasks to start or a preloadJS manifest.

  • callback Function

    Callback to to call with the result of the tasks, this task, and the TaskManager that loaded it

load

(
  • callback
)

Defined in load:100

Start the load

Parameters:

  • callback Function

    Callback to call when the task is done

start

(
  • callback
)

Inherited from Task: start:72

Start the load. This implementation is a NOP.

Parameters:

  • callback Function

    Callback to call when the load is done

toString

() String

Inherited from Task but overwritten in toString:158

Get a string representation of this task

Returns:

String:

A string representation of this task

Properties

_isDestroyed

Bool protected

Inherited from Task: _isDestroyed:37

Bool to keep track if this has been destroyed

_manager

TaskManager private

Defined in _manager:43

The internal task manager

_results

Dictionary private

Defined in _results:51

The load results dictionary

callback

Function

Inherited from Task: callback:30

Callback to call when the task is completed

id

String

Inherited from Task: id:23

The unique id of the task

list

Array

Defined in list:36

The list of other tasks, as an array