Progress
ADM 2 Guide


SmartObject Templates and Masters

You can designate a SmartObject procedure as a persistent procedure; that is, a procedure that is run persistently. You do this from the AppBuilder, in the Procedure Settings dialog box for that procedure. For more information about persistent procedures and the WAIT–FOR statement, see the Progress Programming Handbook and the Progress Language Reference.

Before you can run persistent instances of a SmartObject, however, you must build its external procedure (its SmartObject master). You can build an individual SmartObject master from a template, which the AppBuilder reads into memory as an untitled procedure. (You can either use one of the templates provided with the AppBuilder or build your own templates.) Alternatively, you can create a new master by saving an existing file as another file while in the AppBuilder (choose File Save As on the AppBuilder menu bar).

Recall that conceptually, a SmartObject template is a procedure file that serves as a general starting point for building one or more specific SmartObjects masters. A template usually has minimal user-interface features and very little code (other than included code) and therefore is not meant to be run directly. Adding too much data and too many user-interface features to a template might hinder its general usefulness and maintainability; however, certain templates have associated data and user-interface elements, as appropriate. For example, the template for a SmartDialog has OK, Cancel, and Help buttons—user-interface elements that are standard to dialog boxes.

A SmartObject template generally includes a single support include file: the primary include file for the class on which the SmartObject is based. This include file has the same name as the template but the filename suffix .i instead of .w. For instance, the SmartDataViewer template viewer.w includes the primary include file viewer.i. A primary include file such as viewer.i does not directly contain most of the code needed to support the SmartObject. It contains only those program elements required to compile a master built from that template; all other support code for an object type resides in a super procedure. (See the "Super Procedures" section.)


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