User Tools

Site Tools


howtos:toolcoding:user_interaction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:toolcoding:user_interaction [2013/09/12 19:58]
deryn.crockett [Menu Command]
howtos:toolcoding:user_interaction [2013/09/12 20:16] (current)
deryn.crockett [Menu Command]
Line 55: Line 55:
 The syntax of the menu command is: The syntax of the menu command is:
  
-menu (prompt, numItems, item1, ..., itemN, $choices[]; ​{oneChoice={true,​false}}, ​{defaultChoice={1..N}})  ​+menu (prompt, numItems, item1, ..., itemN, $choices[]; {defaultChoice={1..N}, {oneChoice={true,​false}}})  ​
  
 where where
Line 67: Line 67:
 //​$choices[]//​ is an array of boolean TOOL variables. After the user has entered their menu choices, this array will contain true if the menu item has been selected and false if it has not. This array must be at least as big as the number of items in the menu. //​$choices[]//​ is an array of boolean TOOL variables. After the user has entered their menu choices, this array will contain true if the menu item has been selected and false if it has not. This array must be at least as big as the number of items in the menu.
  
-//onceChoice ​is an optional boolean flag that forces ​the user to choose only one option.+//defaultChoice// ​is an integer ​that specifies which option is the default selection if the user does not make a selection.
  
-//defaultChoice ​is an integer ​that specifies which option is the default selection if the user does not make a selection.+//oneChoice// ​is an optional boolean flag that forces ​the user to choose only one option. 
 + 
 +//​**note:​**//​ If both //​defaultChoice//​ and //​oneChoice//​ are used, defaultChoice must precede oneChoice.
  
 === Example === === Example ===
howtos/toolcoding/user_interaction.1379015925.txt.gz · Last modified: 2013/09/12 19:58 by deryn.crockett