dojox/timing/Sequence (version 1.10)

Summary

This class provides functionality to really sequentialize function calls. You need to provide a list of functions and some parameters for each (like: pauseBefore) and they will be run one after another. This can be very useful for slideshows or alike things.

This array will contain the sequence defines resolved, so that ie. repeat:10 will result in 10 elements in the sequence, so the repeat handling is easier and we don't need to handle that many extra cases. Also the doneFunction, if given is added at the end of the resolved-sequences.

Usage

var foo = new Sequence();
dojox/timing/Sequence

See the dojox/timing/Sequence reference documentation for more information.

Property Summary

Method Summary

  • _go() Execute one task of this._defsResolved.
  • go(defs,doneFunction) Run the passed sequence definition
  • goOn() This method just provides a hook from the outside, so that an interrupted sequence can be continued.
  • stop() Stop the currently running sequence.

Properties

_defsResolved
Defined by: dojox/timing/Sequence

The resolved sequence, for easier handling.

_goOnPause
Defined by: dojox/timing/Sequence

The pause to wait before really going on.

_running
Defined by: dojox/timing/Sequence

Methods

_go()

Execute one task of this._defsResolved.

go(defs,doneFunction)

Run the passed sequence definition

Parameter Type Description
defs Array

The sequence of actions

doneFunction Function | Array
Optional

The function to call when done

goOn()

This method just provides a hook from the outside, so that an interrupted sequence can be continued.

stop()

Stop the currently running sequence.

This can only interrupt the sequence not the last function that had been started. If the last function was i.e. a slideshow that is handled inside a function that you have given as one sequence item it cant be stopped, since it is not controlled by this object here. In this case it would be smarter to run the slideshow using a sequence object so you can also stop it using this method.

Error in the documentation? Can’t find what you are looking for? Let us know!