Release 10.1A: OpenEdge Development:
Progress Dynamics Administration

> ## Saving dynamic objects as static objects

> The Progress Dynamics save as static object mechanism allows you to save only dynamic SmartDataObjects and SmartDataViewers as static ADM objects. These static objects function exactly like their dynamic equivalents, except all rendering and behavioral properties defined in the Repository for the dynamic equivalents are specified directly in the 4GL for the static objects. The result is a 4GL procedure that looks and works like any static SmartDataObject or SmartDataViewer that you create using the AppBuilder.

> Because they are independent from their dynamic originals, like any Dynamics static object, you must explicitly register these static equivalents of dynamic objects in the Repository in order to use them in a Dynamics application.

> Dynamics provides certain options and imposes some constraints on the construction and use of these static objects in relation to their original dynamic equivalents. The following procedure describes what these options and constraints are and how to handle them.

> | To save an existing dynamic SmartDataObject or SmartDataViewer as a static object:

> 1. Open an existing dynamic SmartDataObject or SmartDataViewer in the AppBuilder.

> 2. Open the File menu in the AppBuilder, as shown:

> 3. Choose the Save Dynamic Object As Static item, displaying a Save as dialog box, as shown:

> This figure shows a Save as dialog box for a static SmartDataViewer. If the open dynamic object is a SmartDataObject, the title displays as Save as (SDO).

> 4. Set the following options in this dialog box as you require:

> - File name — By default, this is the same filename as the open dynamic object. However, note that if you are replacing the existing dynamic object with this static equivalent in a container, the static object cannot have the same name as its dynamic equivalent. Change the name of the static object in this dialog box, then replace the dynamic object in its container with the renamed static equivalent using one of the following windows:

> Container Builder — Accessible from the AppBuilder Build menu. For more information, see OpenEdge Development: Progress Dynamics Basic Development .

> Replace Object Instances — Accessible from the Objects menu of the Development tool main window. For more information, see the Progress Dynamics Development tool help.

> - Register object — By default, this is a check box that is checked and allows you to register the new static object in the Repository. By default, the Description, Root directory, and Product module fields are set to the values specified for the open dynamic object. You can change these settings for the static equivalent, and the read-only Save in and Full path name fields update automatically to show you the new values. You can also check boxes to indicate the deployment types and usage for this static object.
> 5. Choose Save to complete the saving of the static object.

> 6. If the open dynamic object contains UI events, the save as static function creates triggers in the static code and writes the `RUN` or `PUBLISH` statements in the triggers to run or publish the specified events. If you want to move the event code from the object super procedure to the static object, itself, you must do this manually.

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