1.2.2. Class Attribute Definition
About this task
A | Configuration: Attribute. |
B | Result: Object dialog box. |
- Configuration: Attribute
The attribute dialog box provides the tools to define the following.
- Definition: Attribute
- Definition: Attribute fields for the Object dialog box.
Definition: Attribute
The top part of the dialog box provides fields for you to define the attribute. Your definition can provide default values and determines the options available to an object designer when creating an object from the class.
Open either a new or existing Attribute dialog box in which you will fill in or modify the top part.
Specifications are as follows.
1 | Value |
2 | Data type |
3 | Instantiation type |
4 | Reference |
1 | Value |
(Optional) Enter the default value for the attribute.
Acceptable values:
- Must be within the range for the attribute type
- Are limited to 80 characters.
- Cannot contain the vertical bar '|' character.
2 | Data type |
Select the data type of the value from the drop-down list:
Data types are:
- Analog
- Boolean
- String
3 | Instantiation type |
Select the option from the drop-down list that will control how a user will deal with the attribute when an object is being created:
Option | When an object is created, a user: |
Hidden | Will be in the class object; however, it will not be listed in the Object dialog box. |
Optional | Can override a class default value, if there is one. The attribute does not have to be specified to create the object. |
Readonly | Will be listed in the Object dialog box; however, the field will be disabled, preventing users from editing it. |
Required | Must provide a value for this attribute. Failure to provide a value when creating an object will generate an error. |
Static |
|
Static Display |
|
4 | Reference |
Check Reference if you want to identify the value of this attribute as the value of another attribute.
Definition: Attribute Fields for the Object Dialog Box
An object designer configures an object based on the class you are creating in an Object dialog box. The specifications you make in the Object Builder Group of the class attribute's Attribute dialog box determine where and how the attribute appears in the Object dialog box.