Try OpenEdge Now
skip to main content
Online Help
Introducing the ABL Editor : Tasks : Writing ABL code : Writing object-oriented code : Coding members implemented via interface or abstraction
 
Coding members implemented via interface or abstraction
If you specify one or more interfaces when creating a new ABL class, the class must include implementations for all methods, events, and properties declared in those interfaces; otherwise, the class cannot be compiled. Similarly, if the class inherits one or more abstract members from an abstract super class, those members must be implemented (unless the inheriting class is also abstract).
To help you satisfy these requirements, the ABL Editor automatically generates stubs for such members when you create the class. For existing class files that do not include the required members, you can use the Override/Implement Members wizard to add them.
You choose whether method stubs added to the file are to include error code, or default return values.
Method stubs automatically generated in new class files
When you use the New ABL Class wizard (or any of the Visual Designer form-creation wizards) to create a class file that implements an interface or inherits from an abstract super class, select one of the following options for the method code:
*Throw a Not Implemented exception
*Return default values
Note that the wizard automatically creates stubs for all of the applicable members, with the method stubs coded according to the option that you select.
Method stubs generated on demand in existing class files
While editing a class file, you can add stubs for any missing members implemented via interface or inherited from an abstract super class. To do so:
1. Select Source > Override/Implement Members.
Note: The tree in the Override/Implement Members wizard lists all methods, events, and properties declared in the applicable interfaces and/or in the abstract super class but missing from the source file. The members are selected by default for generating stubs. You can deselect any methods for which you do not want to add stubs at this time.
2. Select either Generate exceptions for required members or Generate default values for required members.
3. Click Generate to add the selected member stubs to the class file.