Changes

Jump to navigation Jump to search

Overview of the API

46 bytes added, 21:21, 20 May 2011
Line 245: Line 245:     
*'''on.charIn'''(string) is called when the Nspire detects a non arrow key being pressed. ch is the character it detect. If you want to auto start an event in the file linked to key r(like a reset) put on.charIn(“r”) where you want. This Lua program lets you display the value of a valid non arrow key :
 
*'''on.charIn'''(string) is called when the Nspire detects a non arrow key being pressed. ch is the character it detect. If you want to auto start an event in the file linked to key r(like a reset) put on.charIn(“r”) where you want. This Lua program lets you display the value of a valid non arrow key :
 
+
<syntaxhighlight lang="lua">
 
  c = “”
 
  c = “”
 
  function on.charIn(ch)
 
  function on.charIn(ch)
Line 255: Line 255:  
  gc:drawString(c, 0, 0, “top”)
 
  gc:drawString(c, 0, 0, “top”)
 
  end
 
  end
 
+
</syntaxhighlight>
 
----
 
----
 
*'''on.blink'''() ? is called when the focus is lost on the page (like launching the document, changing page etc...)
 
*'''on.blink'''() ? is called when the focus is lost on the page (like launching the document, changing page etc...)
30

edits

Navigation menu