skip to main content
OpenEdge Development: ADM and SmartObjects
Advanced ADM Topics : AppBuilder requirements for SmartObjects
AppBuilder requirements for SmartObjects
If you want to design your own SmartObject procedure file, make sure the src/adm2/smart.i class include file is included, directly or indirectly. You must be aware of the following points about how the AppBuilder interacts with SmartObject procedure files:
*A master procedure file must be runnable by itself:
*It must use no shared variables.
*It must receive no parameters (from other external procedures).
*It must compile successfully.
*If the procedure file is designed to have instance properties, the AppBuilder must be able to execute the editInstanceProperties event procedure for the procedure file. If the AppBuilder cannot locate this event procedure, the AppBuilder disables the Instance Properties option on the Instance menu.
*The AppBuilder determines which SmartLinks it will allow for the procedure file by checking the SupportedLinks property (using the getSupportedLinks function). The AppBuilder also checks the SupportedLinks property to see if the procedure file can be a Page-Target. If so, the AppBuilder enables the Pages button on the Procedure Settings dialog box and the Page number area in the status bar on the AppBuilder main window.
The initial value of the SupportedLinks property is the ADM-SUPPORTED-LINKS preprocessor name, which is usually defined in the object template.
*The procedure file must contain the following ADM event procedures:
Note: The AppBuilder also dispatches the hideObject and viewObject event procedures, if they are available.
*If the procedure file is for a SmartObject that is meant to be visualized, it must return a value for the getContainerHandle function. If the RETURN value is not the handle of a frame, the AppBuilder does not initialize the SmartObject; instead, the AppBuilder creates a visualization using the SmartObject icon. For example, the SmartDataObject has no visualization, so the AppBuilder visualizes it using the SmartDataObject icon.
*If the procedure file is for a SmartObject that is designed to be visualized with a frame, the AppBuilder runs the repositionObject and resizeObject procedures, if they are available. These procedures determine whether the visualization is movable and/or resizable, respectively, at application assembly time. For the AppBuilder to visualize a procedure file with a frame, it must be able to set the parent of the frame by invoking the setObjectParent function.