Progress
ADM 2 Guide


Standard ADM Class Files and Templates

Each ADM class is supported by a set of standard class files of specific types: a primary include file, a property file, a super procedure, and a prototype file. These files, along with a set of templates, provide the basis for the standard SmartObjects available in the ADM. Each ADM class contains one standard class file of each type, but class files of the same type are set up differently for different classes. For example, the property file for the panel class is different from the property file for the viewer class. The standard class files for all ADM classes reside in the %DLC%/src/adm2 directory.

Table 1–2 describes the standard class files for each class. Note that in the File Name column, type is a character string that indicates the particular class; for example, view or viewer for the viewer class.

Table 1–2: Standard ADM Class Files 
File Type
Filename
Description
Primary include file
type.i
  • Starts the super procedure for the class
  • Can initialize some properties
  • References the property file
  • Is referenced directly in a template or in another class’ primary include file
  • References the custom primary include file,1 if relevant
Property file
typeprop.i
  • Defines properties
  • References the prototype file
  • Can define instance properties
  • Can define the instance property dialog
  • References the custom instance definition file,1 if relevant
  • References the custom property file,1 if relevant
Super procedure file
type.p
  • Contains functions and internal procedures that define the behavior for the class
  • References the property file
  • Is run only once for the entire session
  • References the custom exclude definition file,1 if relevant
Prototype file
typeprto.i
  • Defines prototypes for all internal entries (functions, internal procedures) of the super procedure for the class
  1. This custom class file is described in the "Custom ADM Class Files" section.

For example, the following standard class files support the viewer class:

For examples of the contents of standard class files, see "ADM Standard and Custom Class Files."

Templates

Unlike the standard class files, templates reside in the template subdirectory of the %DLC%/src/adm2 directory. They are files that have at least a design-time visualization in the AppBuilder and, accordingly, have the suffix .w; for example, viewer.w. A SmartObject template serves as a basis for including a SmartObject in your application. Conceptually, it is a procedure file that serves as a general starting point for building one or more specific SmartObject masters (SmartObject external procedures).

A template contains very little code. Generally, it contains only the following:

For a description of how SmartObject masters and templates relate, see the "SmartObject Templates and Masters" section. For an example of the contents of a template file, see "ADM Standard and Custom Class Files."


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095