THIS-OBJECT : class-member-referenceThe following code fragment shows two instance methods defined within a class, where you must qualify a call to one of them with THIS-OBJECT because its name, Display, is an ABL reserved keyword:
CLASS TestClass:METHOD VOID Display( ):END METHOD.METHOD VOID Foo( ):THIS-OBJECT:Display( ).END METHOD.END CLASS.
Use of the THIS-OBJECT system reference to call instance methods that are available within the class hierarchy where they are defined is generally optional. However, you must use the THIS-OBJECT system reference to call any instance method whose name is identical to an ABL reserved keyword. The same is true if you are calling an event method on a class-defined or inherited instance event of a class whose name is identical to an ABL reserved keyword. For more information, see the Class-based method call reference entry and the “Class Events Reference” section.
Use of the THIS-OBJECT system reference to access instance variable data members or properties that are available within the class hierarchy where they are defined is optional. However, you must use the THIS-OBJECT system reference to access any such data member or property whose name is identical to an ABL reserved keyword. For more information, see the Class-based data member access and Class-based property access reference entry.
You cannot use the THIS-OBJECT system reference to access a static class member.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |