Changes

Jump to navigation Jump to search

on.timer

14 bytes added, 16:30, 17 December 2013
m
no edit summary
Line 1: Line 1:  +
The event '''on.timer''' is fired when a [[:Category:timer|timer]] is run (called periodically according to the period set in [[timer.start]])
   −
The event '''on.timer''' is fired when a [[:Category:timer|timer]] is run.
+
It has no argument.
 
  −
By default, it has no argument, but you can pass gc to it for instance.
      
== Example ==
 
== Example ==
   −
Below is an example of a program that draws a line on the screen when the user resizes the window :
+
Below is an example of a program that displays a message for 1 second when a key is pressed.
 
<source lang="lua">
 
<source lang="lua">
   Line 29: Line 28:  
</source>
 
</source>
   −
Check out the [http://www.inspired-lua.org/2011/05/linking-events/ the full explanation of this example] in the tutorials part.
+
Check out the [http://inspired-lua.org/index.php/2011/05/linking-events/ the full explanation of this example] in the tutorials part.
       
[[Category:Events]]
 
[[Category:Events]]

Navigation menu