Progress
ADM 2 Guide
AppBuilder Requirements for SmartObjects
If you want to design your own SmartObject procedure file, make sure that the
src/adm2/smart.i
class include file is included, directly or indirectly. However, 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:
- 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, then 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:
- 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. Note that in order 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.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |