User Tools

Site Tools


jwlua:uservalueinput

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
jwlua:uservalueinput [2013/09/19 20:36]
jariw [Defining the dialog fields]
jwlua:uservalueinput [2015/04/28 10:25] (current)
jariw [SetInitValues()]
Line 22: Line 22:
 </​code>​ </​code>​
  
-==== (0.07) ReadOnly property ====+==== (FUTURE_VERSION) ReadOnly property ====
  
 The ''​ReadOnly''​ boolean property can set all the fields in the dialog box to information fields only and remove the Close button from the dialog box. The ''​ReadOnly''​ property defaults to false. Setting the ''​ReadOnly''​ property to ''​true''​ has a higher priority than using the ''​SetReadOnlyFields()''​ method. The ''​ReadOnly''​ boolean property can set all the fields in the dialog box to information fields only and remove the Close button from the dialog box. The ''​ReadOnly''​ property defaults to false. Setting the ''​ReadOnly''​ property to ''​true''​ has a higher priority than using the ''​SetReadOnlyFields()''​ method.
Line 37: Line 37:
 | ''​SetInitValues''​ | Sets the default values for the fields (optional). | | ''​SetInitValues''​ | Sets the default values for the fields (optional). |
 | ''​SetLists''​ | Sets the available list items for the fields (optional, but required for the "​Set"​ and "​NumberedList"​ types). | | ''​SetLists''​ | Sets the available list items for the fields (optional, but required for the "​Set"​ and "​NumberedList"​ types). |
-| (0.07) ''​SetReadOnlyFields''​ | Defines some fields to read-only information (optional). |+| (FUTURE_VERSION) ''​SetReadOnlyFields''​ | Defines some fields to read-only information (optional). |
  
 Each field is represented as a parameter to the setter method. If a small number of fields are used, each field can be represented as a separate parameter to the method, such as: Each field is represented as a parameter to the setter method. If a small number of fields are used, each field can be represented as a separate parameter to the method, such as:
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''​. |
-(0.06) ''"​Set"''​ | A set of options where each one can be toggled ON/OFF, such as {true, false, true} |+''"​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} |
 | ''"​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.06) 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. |
  
Line 126: Line 128:
  
 If there'​s any danger that 2 texts in a string list might be identical (such as when a list of all staves in a score is listed), use ''"​NumberList''​ instead of ''​String''​. If there'​s any danger that 2 texts in a string list might be identical (such as when a list of all staves in a score is listed), use ''"​NumberList''​ instead of ''​String''​.
-==== (0.07) SetReadOnlyFields() ====+==== (FUTURE_VERSION) SetReadOnlyFields() ====
  
 The ''​SetReadOnlyFields()''​ method sets individual fields to read-only text information. Use this only when the dialog box is a mix of information fields and regular input fields. If the dialog box should only contain information fields, use the ''​ReadOnly''​ property instead. The ''​SetReadOnlyFields()''​ method sets individual fields to read-only text information. Use this only when the dialog box is a mix of information fields and regular input fields. If the dialog box should only contain information fields, use the ''​ReadOnly''​ property instead.
jwlua/uservalueinput.1379622978.txt.gz · Last modified: 2013/09/19 20:36 by jariw