Objects are created from classes.
- Creating an ordered object
To do this, create an entry below the Ordered Objects structure. To do this, select a class whose type you want the object to be created at run time and give the element a name. You can now designate a class for this object definition from which to create an object at run time. The defining class and each class derived from it are available for this purpose.
Ordered objects have an order index that determines the order in which the objects can be addressed. The order of the result generation is also determined by the order index. The order can be set by moving the object definition at design time. At run time, the order index can be set by the ObjectOrder attribute.
- Creating an unordered object
Unordered objects are defined in the same way as ordered objects. Unordered objects do not have a working order index.
- Creating an object as a local variable
This example creates an object definition r of the Rect class type as a local variable. The Object of type Rect is then created with the New operator.
Dim r As "Rect"
r := New "Rect"
The code can be shortened further:
Dim r As New "Rect"
If a derived class is defined by the Class Rect, an object can also be created by the class:
Dim r As "Rect"
r := New "RectDouble"
To clarify the delimitation of the class name from other strings use the following declaration for syntactic validation:
Dim r As ::"Rect"
r := New ::"RectDouble"
For class names without spaces, the commas can be omitted:
Dim r As ::Rect
r := New ::RectDouble