This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
jwlua:uservalueinput [2014/01/20 07:25] jariw [(0.11) SetReadOnlyFields()] |
jwlua:uservalueinput [2015/04/28 10:25] jariw [SetInitValues()] |
||
---|---|---|---|
Line 62: | Line 62: | ||
| ''"Number"'' | Any number (intereger ) value, such as 0, 1.75, 1000, etc. | | | ''"Number"'' | Any number (intereger ) value, such as 0, 1.75, 1000, etc. | | ||
| ''"Boolean"'' | A value that can be either ''true'' or ''false''. | | | ''"Boolean"'' | A value that can be either ''true'' or ''false''. | | ||
+ | | ''"Measurement"'' | An EVPU number, that is displayed to the user in the preferred measurement unit. | | ||
| (FUTURE_VERSION) ''"Set"'' | A set of options where each one can be toggled ON/OFF, such as {true, false, true} | | | (FUTURE_VERSION) ''"Set"'' | A set of options where each one can be toggled ON/OFF, such as {true, false, true} | | ||
| ''"NumberedList"'' | A set options, where one could be selected. Value is a 1-based index number. | | | ''"NumberedList"'' | A set options, where one could be selected. Value is a 1-based index number. | | ||
Line 100: | Line 101: | ||
Example: | Example: | ||
<code lua>local dialog = finenv.UserValueInput() | <code lua>local dialog = finenv.UserValueInput() | ||
- | dialog.SetTypes("String", "Boolean") | + | dialog:SetTypes("String", "Boolean") |
- | dialog.SetInitValues("Oboe", true)</code> | + | dialog:SetInitValues("Oboe", true)</code> |
If a **list** (through ''SetLists()'') is connected with a input field and init value isn't found in the list, the topmost item in the list will be selected. | If a **list** (through ''SetLists()'') is connected with a input field and init value isn't found in the list, the topmost item in the list will be selected. | ||
- | The call to ''SetInitValues()'' is **optional**. (0.11) However, if a dialog with ''ReadOnly'' content is defined, it wouldn't make much sense to not call it. | + | The call to ''SetInitValues()'' is **optional**. (FUTURE_VERSION) However, if a dialog with ''ReadOnly'' content is defined, it wouldn't make much sense to not call it. |
==== SetLists() ==== | ==== SetLists() ==== | ||
Line 116: | Line 117: | ||
| ''"Number"'' | A popup that will contain the numbers. | Number | | | ''"Number"'' | A popup that will contain the numbers. | Number | | ||
| ''"Boolean"'' | A popup with a ''true'' and ''false'' string. The first string will represent the ''true'' state, the second string will represent the ''false'' state. More strings than 2 will result in an error. | Boolean | | | ''"Boolean"'' | A popup with a ''true'' and ''false'' string. The first string will represent the ''true'' state, the second string will represent the ''false'' state. More strings than 2 will result in an error. | Boolean | | ||
- | | ''"Set"'' | A list with a checkbox at each string. | Table | | + | | ''"Measurement"'' | A popup that will contain the EVPU values displayed in the user's preferred measurement unit. | Number | |
+ | | (FUTURE_VERSION) ''"Set"'' | A list with a checkbox at each string. | Table | | ||
| ''"NumberList"'' | A popup that will contain the strings. | 1-based item number. | | | ''"NumberList"'' | A popup that will contain the strings. | 1-based item number. | | ||