The handle-definition
is used
with DEFINE DATA
LOCAL
, DEFINE DATA
OBJECT
, DEFINE DATA
PARAMETER
, DEFINE
DATA INDEPENDENT
and DEFINE DATA CONTEXT
.
The handle-definition
has the
following syntax:
handle-name | HANDLE OF |
dialog-element-type | CONSTANT |
init-definition | ||||||||||
OBJECT |
INIT |
|||||||||||||
(array-definition)
HANDLE OF |
dialog-element-type |
CONSTANT |
array-init-definition | |||||||||||
OBJECT |
INIT |
This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
A handle identifies a dialog element in code and is stored in handle variables. For further information, see NaturalX in the Programming Guide.
The HANDLE
definition in the DEFINE DATA
statement is generated automatically on the creation of a dialog element or
dialog.
After having defined a handle, you can use the handle-name in any statement to query, set or modify attribute values for the defined dialog-element-type.
See also Introduction to Event-Driven Programming and Event-Driven Programming Techniques in the Programming Guide.
1 #SAVEAS-MENUITEM HANDLE OF MENUITEM 1 #OK-BUTTON (1:10) HANDLE OF PUSHBUTTON
Syntax Element | Description |
---|---|
handle-name
|
Handle Name:
The name to be assigned to the handle; the naming conventions for user-defined variables apply. For further information, see Naming Conventions for User-Defined Variables in Using Natural Studio. |
HANDLE OF
dialog-element-type |
Dialog Element Type:
The type of dialog element. Its possible values are the values
of the For details, see Dialog Elements and Attributes in the Dialog Component Reference. |
HANDLE OF OBJECT |
Handle of Object:
Used in conjunction with NaturalX. For further information, see NaturalX in the Programming Guide. |
CONSTANT |
CONSTANT Option:
The variable/array is to be treated as a named constant. The constant value(s) assigned will be used each time the variable/array is referenced. The value(s) assigned cannot be modified during program execution. Notes:
|
INIT |
INIT Option:
The variable/array is to be assigned an initial value. This value
will also be used when this variable/array is referenced in a
Note: |
init-definition |
Initial-Value
Definition:
With the |
array-definition |
Array Dimension
Definition:
With an
|
array-init-definition |
Array Initial Value:
The array is to be assigned an initial value. This value will
also be used when this array is referenced in a |