hiEditPropList
hiEditPropList(
g_object
[ t_title ]
[ g_modifiable ]
)
=> t / nil
Description
Opens the property list editor for the given g_object.
The object must be either a database object, a design manager object, a probe object, or a list. This function is compatible with the SKILL function makeForm, which was used in earlier versions of the software, where g_object is a list.
This function can be used to create a form by specifying a list as the g_object. This list must contain one or more lists of a specified format. This format is the same format specified for the function makeForm. Each sublist contains a variable that corresponds to a field on the form. When the form is applied, the new values are assigned to their respective variables, to use them later in a SKILL procedure.
Each of the sublists that make up the main list must be in the following format:
'(s_sym t_prompt t_type [g_value] [l_range] [t_help] [l_constraints])
The elements of each sublist are:
|
s_sym
|
Variable (symbol) representing the field on the form.
|
|
t_prompt
|
Prompt string describing the variable function. This prompt is displayed to the left of the corresponding field on the form.
|
|
t_type
|
String describing the type of the variable. Permitted values are:
-
“integer” or “int” -
“float” -
“string” -
“boolean” or “Boolean” or “yesOrNo” -
“filename”, “fileName” or “file”
|
|
g_value
|
Optional initial value for the variable (which must be compatible with the type specified). This value is the field’s initial value when the form is first displayed. Valid values for a Boolean type are t, “TRUE”, “true”, “yes”, “FALSE”, “false”, “no”, or nil. It is not possible to show an empty value for integer or float types, but strings can have a value of “”. If an initial value is not specified, the symbol s_sym is evaluated for the initial value. If s_sym is unbound, a warning is issued and this function returns nil.
|
|
l_range
|
Optional list defining the range of possible values that the variable can assume. This is valid for all types except “boolean”. If t_type is “int” or “float”, l_range must be a list of two integers or floating point numbers that represent the minimum and maximum values of the variable. If t_type is “string” or “filename”, l_range must be a list of possible strings.
|
|
t_help
|
Optional help string for this variable. This is currently not supported.
|
|
l_constraints
|
Optional string or list of strings describing possible constraints on the variable. Currently, the only constraint supported is “read-only.” If this constraint is specified, the associated field associated appears grayed-out and is non-editable.
This constraint is ignored if t_type is “boolean” or if t_type is “filename” or “string” and an l_range is specified.
|
Arguments
|
g_object
|
Database object, design manager object, probe object, or list.
|
|
t_title
|
Name to be displayed in the window manager frame of the Property List Editor form. If it is not specified, an appropriate title is used.
|
|
g_modifiable
|
Determines if properties can be modified. If g_modifiable is set to t, you are allowed to add, delete, or modify properties by selecting the appropriate button on the form. If set to nil, you are not allowed to add, delete, or modify the properties in any way, except to change their values. The default for g_modifiable is t.
|
Values Returned
|
t
|
The form has been brought down by pressing the Done button.
|
|
nil
|
The Cancel button was pressed, s_sym is unbound, or g_object is not a valid database object, design manager object, or list.
|
Examples
The following is an example of hiEditPropList using the list object:
age = 3
mylist = list( '('myname "Name" "string" "Dumbo"
list("Dumbo" "Mickey Mouse" "Donald Duck") )
list('age "Age" "int")
list('weight "Weight" "float" 3600.0
list(0 9000.0))
list('type "Type" "string" "ANIMAL" nil
"" "read-only")
'('cartoon "Disney character?" "boolean" t))
hiEditPropList( mylist "Cartoon Character" nil )
The symbol variables myname, age, weight, type, and cartoon can now be manipulated in subsequent lines. They contain the values you specify on the form.
Related Topics
Form and Field Functions
Return to top