Previous Next

Class-based object reference
References an instance of an ABL or .NET class and provides access to instance class members (per the restrictions of the access levels assigned to the members).
Syntax 
 
object-reference [ [ key ] ] [ : {   data-member 
                                     | property 
                                     | method 
                                   }
                              ]
object-reference
Specifies a reference to an instance of a class (an object). This can be a variable (data member), property, data member or property array element, handle attribute (such as FIRST-OBJECT), method return value, ABL function return, or user-defined function return value defined for an ABL or .NET object type. It also can be an appropriately-used system reference, such as SUPER or THIS-OBJECT. Its value references an instance of a specified class (class-based object). If it is for a class, the data type of the value can be for the class type itself or for a super class of the referenced class. If it is for an interface, its value can reference an instance of any class that implements that interface.
[ key ]
Specifies an indexer for the default indexed property of a .NET class. The brackets are a required part of the syntax.
The key value is an index value of any supported .NET data type that identifies the property value you want to reference. If this value is an object reference, you can also use it to access any public instance data-member, property, or method on the .NET class instance that the property references. For more information, see the reference entry for a Class-based property access.
Note:
data-member
Specifies the name of a PUBLIC instance variable defined in the specified ABL class or of a public instance field defined in the specified .NET class. The value of the ABL variable data member can be written or read for the class instance referenced by object-reference. The value of a .NET field can be read or written for the class instance specified by object-reference, unless it is defined as a constant (using the C# const keyword). If it is a constant, it can only be read. For more information, see the reference entry for a Class-based data member access.
property
Specifies the name of a PUBLIC instance property defined in the specified ABL or .NET class. The value of this property can be written or read for the class instance referenced by object-reference, depending on the property definition. For more information, see the reference entry for a Class-based property access.
method
Specifies the name and any run-time parameters taken by a PUBLIC instance method defined in the specified ABL or .NET class, or a call to a built-in event method. A class method can provide a value, depending on the method definition. For more information on calling class methods, see the reference entry for a Class-based method call. For more information on the built-in event methods, see the “Class Events Reference” section.
Notes 
*
*
*
System.Threading.Thread or any class derived from it
*
System.Delegate or any delegate type derived from it
*
*
You cannot define or otherwise obtain an object reference to a .NET mapped object type (for example, System.Int32), except when overriding a .NET method or when implementing a method or property of a .NET interface. You can only access instances of .NET mapped object types as corresponding ABL primitive types (for example, INTEGER). For more information, see the Data types reference entry. However, you can access .NET static properties and methods on their defining .NET mapped object types.
*
See also 
Class-based data member access, Class-based method call, Class-based property access, CLASS statement, FIRST-OBJECT attribute, LAST-OBJECT attribute, NEW function (classes), SUPER system reference, THIS-OBJECT system reference

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.