Sfairadora

  • Reference Guide

Value Selector

The value selector enables the user to select a value of a data item from a predefined list of available values. In principle, it is a group of radio buttons. The list of values can be structured hierarchically – nested levels are displayed either in a subordinate menu, or they can be unfolded into an indented list. It is often convenient to put the value selector into a disp‑folder. The list of values is then displayed in a subordinate menu, instead of being located directly in the window.

Display

Item
Description
Multicolumn
If checked, and the list of values is longer than the height of the window, the list is broken into multiple columns.
Borders
The spaces left between the frame and the contents of the list of values. Values for all directions can be specified individually. If no value is specified, appropriate borders are determined automatically.

Functionality

Item
Description
Object name
Name of the object where the edited data is located. You can select one of the objects provided by parent dispels.
Data reference
Reference to a data item within the above identified object.
The identified data should be of the same type as the values specified below. If this is not the case, type conversion is used to convert the value received from the data item to the type of every item in the list.
Getter function
This function is used to determine the displayed value from the edited data. The returned value is compared to values in the list. The item whose value is equal to the value returned by the function is selected.
The function is specified in the Enki language.
Function parameter:
val
the current value of the data item determining the value selector state. Its type corresponds to the edited data item type. If data is absent, NONE value is passed.
Result:
the value to be compared with values in the list.
Setter function
This function is used to insert a value into the edited data item when an item from the list is selected.
The function is specified in the Enki language.
Function parameter:
val
value assigned to the selected item.
Result:
the value that will be saved into the data item. If the result type fails to match the type of the data item in which it should be stored, a type conversion is performed. If the function returns the NONE or NOT_PRESENT constant, and the edited data item is optional, its value is removed.
Default value
The value stored to the data item when the selected item is switched off. If no default value is specified, the selected item cannot be switched off; the user can only switch to another item.
Values
Uniform value type
If you specify a type, all values in the subsequent list will be of this type. If no type is specified, you can select the type individually for every item in the list.
Table of values
Title
Value label displayed when selecting values from the list.
Item type
You can choose between value and nested menu. If you choose nested menu, a button appears in the Value column opening a window with a subordinate table of values.
Value
Value assigned to the given item.
Details
All settings for the given item. They are explained in the following table.

Details of Rows in the Table of Values

Item
Description
Title
Value label – see above.
Icon
Value icon. If specified, it is displayed in the list to the left of the value label instead of the standard bullet symbol. The icon is entered using the icon editor.
Separator
If checked, the item in the list is separated from the preceding item by a line. This option has no meaning for the first element in the list as there is never a line displayed above the first element.
Item type
See above – either value or nested menu. The remaining settings depend on this choice.
Item type = value
Value
Item value – see above.
Displayed icon
Icon displayed for the displayed title (see the next item). The icon is defined in the icon editor.
Displayed title
If the value selector is inserted into a disp‑folder as a menu (external display) and the disp‑folder contains a line editor in which the Find text for value option is on, this text will be displayed for the given value in the line editor. If this text is not specified, the normal title specified above is used.
The distinction between the displayed title and the normal title allows you to display abbreviated information about the selected item while the item is described in more detail in the menu.
Item type = nested menu
Nested menu unfolded
If checked, the nested menu defined here is initially displayed as an unfolded list. If unchecked, a folded subordinate menu is displayed. The user can switch between these two states as required.
Nested menu values
Table of values – same as described above.
Definition type: Value_selector_def