Progress
Open Client
Developer’s Guide


Specifying 4GL Procedures and User-defined Functions

To specify 4GL procedures for an AppObject or SubAppObject definition, you must:

  1. Set the Propath Components list box to allow ProxyGen to locate the available r-code files.
  2. Add the r-code files for this object from the set of files made available under the directories specified as Propath Components. Add each procedure according to whether it is executed non-persistently or persistently.
  3. Optionally, customize each procedure entry to configure the corresponding method (if non-persistent) or ProcObject (if persistent).
  4. Optionally, for ProcObjects only, customize the method definitions for all specified internal procedures and user-defined functions.

The following sections provide information about:

Setting the Propath Components List Box

To access the procedures for AppObject and SubAppObject definitions, you must first specify, in the Propath Components list box, the directories that contain the r-code for these procedures. Typically, these directories correspond to a portion of the AppServer PROPATH environment setting. You can add, edit, or remove a Propath Component using the New, Edit, and Delete buttons on the AppObject tab folder.

You can only add 4GL procedures to a proxy that ProxyGen can locate using the Propath Components setting. The PROPATH environment variable itself might be different between the development and deployment machines, but the relative path for the r-code files below a specified PROPATH directory must remain unchanged. Thus, if you move the r-code files to a separate development machine for access by ProxyGen, make sure that you maintain the directory structure used for relative pathnames under the Propath Components setting.

Adding and Deleting Procedure Files

You can add any 4GL procedure file to an AppObject or SubAppObject definition, provided that the compiled (r-code) version of the file is available to ProxyGen through the Propath Components setting. For information on compiling 4GL procedures, see the Progress Programming Handbook .

NOTE: If you are generating a Java proxy that accesses a Progress SmartDataObject as an SDOResultSet, you do not have to make the compiled r-code for the SmartDataObject available to ProxyGen. The Java SDOResultSet already understands how to access standard SmartDataObject functionality. For more information, see Using SmartDataObjects From Java Clients." However, if you are defining a ProcObject in ProxyGen to directly access the SmartDataObject as a Progress persistent procedure, you must make the compiled r-code available to ProxyGen, like any other 4GL procedure.

To add procedure files to your object definition:

These choices display either the Add Procedures dialog box or the Add Persistent Procedures dialog box for your current proxy object. The user interface is almost identical for the two dialog boxes. Both dialog boxes allow you to:

The difference between the two dialog boxes is in the execution type of the procedure file that is added. A method is generated in the proxy for each non-persistent procedure. A ProcObject class factory method is generated for each persistent procedure. (For information on proxy methods, see "Overview," and Programming Concepts.")

After selecting and adding the respective procedure files, any non-persistent procedures appear in the Procedures list and any persistent procedures appear in the Persistent Procedures list of the Procedures tab folder on the main window.

To delete procedures from either list in the Procedures tab folder:

  1. Select one or more procedures in one list.
  2. Press the Delete key or choose Procedure Delete from the menu bar.
Changing the Execution Mode (Type)

You can change the execution mode type of any procedure files already added to a proxy object definition using the Procedures tab folder. This folder allows you to select and move procedures between non-persistent execution (Procedures list) and persistent execution (Persistent Procedures list).

To move procedures between modes:

  1. Select one or more procedures in one list.
  2. Choose the associated arrow button or Procedure Change Type from the menu bar to move the selected procedures to the opposite list.
Customizing Method and ProcObject Definitions

You can customize method and ProcObject definitions for added procedure files according to your application requirements. From the Procedures tab folder:

  1. Select a procedure file in one of the lists.
  2. Double-click the selection or choose Procedure Customize from the menu bar.

This displays the corresponding Customize Procedure or Customize Persistent Procedure dialog box for your proxy object. Both dialog boxes provide:

The Customize Persistent Procedure dialog box also has an Internal Procs tab folder to customize methods (internal procedures and user-defined functions) of the specified ProcObject.

In the Procedure tab folder, you can:

In the Parameters tab folder, you can set check boxes to indicate whether one or more method or ProcObject parameters allow the 4GL unknown value (?). If you check the Use AppObject Unknown Setting box, these parameter check boxes are disabled.

In the Internal Procs tab folder for ProcObjects (Customize Persistent Procedure dialog box):

Customizing Method Definitions In a ProcObject

You can customize the definitions for methods included in a ProcObject according to your application requirements. From the Customize Persistent Procedure dialog box:

  1. Select an included internal procedure or user-defined function from the Internal Procedures/User-Defined Functions list.
  2. Double-click the selection or choose the Customize button.

The Customize Internal Procedure/UDF dialog box appears. This dialog box provides:

In the Procedure tab folder, you can:

In the Parameters tab folder, you can set check boxes to indicate whether one or more method parameters allow the 4GL unknown value (?). If you check the Use AppObject Unknown Setting box, these parameter check boxes are disabled.


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