Progress
ADM 2 Guide
Custom Class Files
The custom class files for a given ADM class are built into the class. These files contain a structure for the required application logic, as well as instructions for adding this code. The following list describes the custom class files, including for each file the filename format, the file type, and a discussion of the types of changes you can make with the file:
- Custom primary include file (filename:
prim-incl-file
custom.i
). This include file is referenced in the standard primary include file. It contains the code to start the custom super procedure. This code is initially commented out; you must uncomment it manually once you have developed your custom super procedure. You can also use this file to initialize properties.- Custom property file (filename:
prop-file
custom.i
). This include file is referenced in the standard property include file. It allows you to extend the behavior of the class by defining new properties.- Custom super procedure (filename:
super-proc
custom.p
). This structured procedure file is referenced (instantiated) in the custom primary include file. It allows you to define internal functions and procedures to support new properties in the custom property file (that is, to define new behavior), and generally to extend or override the standard behavior of the class it belongs to:
- To extend the standard behavior of a class, create a local version of a standard function that contains the statement SUPER( ) or procedure that contains the statement RUN SUPER, then add code lines before and/or after the RUN SUPER statement that provide additional behavior before and/or after the standard behavior.
- To override a particular behavior, remove the standard behavior by defining an EXCLUDE–{
proc-or-func-name
} preprocessor value in the custom exclude definitions file for this class. This causes the removal of the corresponding procedure or function from the standard super procedure file. You then define in the custom super procedure a procedure or function of your own that has the same name as the procedure or function that you are overriding. (The custom exclude definitions file is described later in this section.) Be sure to include the RUN SUPER or SUPER( ) statement if the procedure or function that you are placing has it.- Custom prototype file (filename:
proto-file
custom.i
). This include file is referenced in the custom property include file. It allows you to define the function and procedure prototypes to match the internal entries of the custom super procedure. These prototypes allow an Open4GL client (for example, a Java client) to identify the entry points of the corresponding SmartObject.- Custom exclude definition file (filename:
class-name
exclcustom.i)
. This include file is referenced in the standard super procedure file. It allows you to exclude procedures and/or functions by defining an EXCLUDE–{proc-or-func-name
}
preprocessor value. Each internal entry in a super procedure file is enclosed by special preprocessor code that checks for the existence of a corresponding EXCLUDE–{proc-or-func-name
}
preprocessor value and removes the procedure or function from the compilation. You typically exclude a procedure or function so that you can rewrite it in the custom super procedure. Note that the EXCLUDE mechanism is available not only for super procedures but also for any standard structured procedure created in the AppBuilder.Note that the standard class files do not contain a file corresponding to the custom exclude definition file.
- Custom instance definition file (filename:
class-name
defscustom.i
). This include file is referenced in the standard property include file. It allows you to modify the list of instance properties for the class, usually by adding properties. You can also use it to change the Instance Property dialog itself, by specifying the filename of a different Instance Properties dialog box.Note that the standard class files do not contain a file corresponding to the custom instance definition file.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |