Difference between revisions of "on.construction"

From Inspired-Lua Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
This Event is called at the beginning of a script, where you can initialize your variables etc., for example.<br /><br />
+
This event is called at the very beginning of a script, where you can initialize your variables etc., for example.<br /><br />
  
 
{{Since|3.2}}
 
{{Since|3.2}}
 +
 +
'''Note''' : the Nspire-specific Lua API is not yet ready when this event is fired. Thus, you cannot retrieve the window's width etc., for instance (it would return 0).<br />
 +
In order to initalize things "one-time" that require the Nspire API, you would have to do that within [[on.resize]] with an ''inited'' flag, for example.
  
  
 
[[Category:Events]]
 
[[Category:Events]]

Latest revision as of 15:28, 17 December 2013

This event is called at the very beginning of a script, where you can initialize your variables etc., for example.

This has been introduced in TI-Nspire OS 3.2 (Changes).


Note : the Nspire-specific Lua API is not yet ready when this event is fired. Thus, you cannot retrieve the window's width etc., for instance (it would return 0).
In order to initalize things "one-time" that require the Nspire API, you would have to do that within on.resize with an inited flag, for example.