Class UITIMER

Name

UITIMER  --  Timer.

Synopsis

 UITimer(<period>,<action>,[<data>])	--> UITimer object
 
 

Description

Class UITimer

Attributes

<className> - Class name. Value should be "UITimer".
<period> - Number. Period in milliseconds (1/1000 second) between <action> call.
<action> - Code block. Called code block.
<data> - Any type. Data connected to timer.

Methods

START Restart timer with new parameters.
STOP Stop running timer.
UITIMER Constructor. Run timer.

Method UITIMER:START()

 start([<period>],[<action>],[<data>])
 <period>	- Number. New period in milliseconds (1/1000 second) between <action> call.
 <action>	- Code block. New called code block.
 <data>		- Any type. New data connected to timer.

Method UITIMER:STOP()

 stop()

Method UITIMER:UITIMER()

 UITimer(<period>,<action>,[<data>])	--> UITimer object

Example:

 // Run showTime() each second.
 t := UITimer( 1000, {|data| showTime() } )
 

Platforms

No dependies of platform.