Release 10.1A: OpenEdge Development:
AppBuilder

> ## Inserting text-string tokens from lists

> ##### Database field names

> To insert the name of a database field into an editing area, choose Insert Database Fields from the Section Editor menu or choose the Section Editor’s pop-up menu by right-clicking in the editing area. The Field Selector dialog box appears, as shown in Figure 2–12.

> Figure 2–12: Field Selector dialog box

> This dialog box lets you choose any field for any currently connected database.

> | To specify a database field:

> 1. Select a database. The Tables and Fields lists change.

> 2. Select a table. The Fields list changes again.

> 3. Select the field names that you want to insert in the current editing area:

> - The Select All button selects all of the fields for the current table.
> - The Deselect All button deselects all of the currently selected fields.
> - To select multiple fields but not all of them, hold down the CTRL key while selecting.
> 4. Specify a prefix (qualifier) for the field name:

> - The None radio button prefixes nothing to the field name.
> - The Table radio button prefixes the table name to the field name.
> - The Database.Table button prefixes the database and table names to the field name.
> 5. Choose OK to insert the fields. AppBuilder inserts the field names at the cursor location in the current editing area or replaces selected text.

> ##### Event names

> To insert event names in an editing area, choose Insert Event Name. The Choose Event dialog box appears, as shown in Figure 2–13.

> Figure 2–13: Choose Event dialog box

> This dialog box displays a list of all events recognized by the Progress 4GL. To choose a listed event, select it and click on OK:

> - Use the Event Filters radio buttons to view different types of events.

> - To specify a keyboard event, choose the Keyboard Event button.

> ##### Procedure/function calls

> To insert a call to an internal procedure or function or to a `SUPER` procedure’s internal procedure or function in an editing area, choose Insert Procedure Call. The Insert Procedure Call dialog box appears, as shown in Figure 2–14.

> Figure 2–14: Insert Procedure Call dialog box

> Table 2–11 identifies and describes the options available on the Insert Procedure Call dialog box.

> Table 2–11: Options on the Insert Procedure Call dialog box
> Option | Description
> --- | ---
> Procedure Object | Displays the name of the procedure object that is active in the code Section Editor as indicated by the entry `THIS-PROCEDURE`, any SmartObjects, or super procedures defined for the object. A drop-down list is available from which you can choose a different procedure object. To edit a Web object, choose web-utilities-hdl from the drop-down list to access the internal entries of the Web utility. The web-utilities-hdl is a procedure handle defined for all Web objects that reference event procedures, method procedures, and API functions of the Web utility object, `web-util.p`.
> Entries in Object | When either the Procedures option or the Functions option is selected, this option displays a list of names of the current procedure object’s procedures or functions, respectively. The procedure call code that you can insert into the code Section Editor from this list displays in the Code to Insert field. If procedures or functions are for actively running SmartObjects and super procedures, the insert code includes any run-time parameters for that procedure or function. You might have to replace each parameter name with the appropriate expression (that is, a constant, field name, variable name, or expression) for the specific call in your code. The data type of each parameter displays in comments. For procedures and functions in the `THIS-PROCEDURE` object, the dialog box does not provide the run-time parameters. You can determine the appropriate run-time parameters by switching to that procedure or function in the Section Editor and reviewing any parameter definitions.
> About Entry button | If clicked, displays additional information about the procedure or function currently highlighted. If the current procedure object is a SmartObject and it has an internal procedure named object-help, choose About to run that procedure in the object, passing the current procedure name as an `INPUT` parameter. The object can provide procedure-specific help. If the object has no object-help procedure, the Insert Procedure Call dialog box runs AppBuilder online help for the selected procedure.
> Code to Insert | Displays the code that you can insert into the code Section Editor’s edit area. You can edit this code before inserting it into the Section Editor.
> V8 Call button | Allows you to access the Insert Procedure Call - Version 8 dialog box to insert Version 8 style `ADM RUN`, `DISPATCH`, and `NOTIFY` procedure calls into code. You might need to use this dialog box if you maintain Version 8 style SmartObjects in the Version 9 AppBuilder. For more information about the Version 8 functionality associated with the Insert Procedure Call - Version 8 dialog box, see the Progress Version 8 documentation.

> Use the Procedure Object drop-down list to select the appropriate ADM object. This allows you to call the procedures and functions for that super procedure. Figure 2–15 shows the procedures for `containr.p`.

> Figure 2–15: Listing insertable procedures

> The Procedure Object field lists all of the procedure handles (`THIS-PROCEDURE` or SmartObject instances) referred to in the current procedure file. For a standard window procedure file, `THIS-PROCEDURE` is the only procedure handle. For a SmartContainer, each SmartObject instance has a handle that is listed, in addition to `THIS-PROCEDURE`, which is listed for the SmartContainer itself. When you choose a procedure handle in the Procedure Object field, all of the internal procedures or functions listed pertain to the procedure associated with the object.

> Note: AppBuilder does not keep track of parameters needed for internal procedures in `THIS-PROCEDURE`. It does this only for procedures and functions in SmartObject instances used by `THIS-PROCEDURE`. If you insert a `RUN` statement for a procedure defined in `THIS-PROCEDURE`, you must either check to see if the correct parameters are passed or wait for the Progress Compiler to do so.

> ##### Preprocessor names

> To insert preprocessor names in an editing area, choose Insert Preprocessor Name. The Preprocessor names are listed under its tab in the Code References window, as shown in Figure 2–16.

> Figure 2–16: Preprocessor Names dialog box

> To select a preprocessor name, click on the name and choose OK. For more information about preprocessor names, see the online help.

> ##### Queries

> You can use AppBuilder’s query-building dialog boxes to generate a query definition rather than typing in the query. To do this, choose Insert Query. The Query Builder dialog box appears, as shown in Figure 2–17.

> Figure 2–17: Query Builder dialog box

> This dialog box is the first in a series of dialog boxes that help you generate a query. For more information about building queries in AppBuilder, see the "Defining and editing queries using Query Builder" section.

> When you finish generating the query, choose OK. The Section Editor inserts the entire text of the query at the cursor location in the current editing area.

> ##### Object names

> To insert object names in the current editing area, choose Insert Object Name. The Code References window appears, open to the Object Names tab, as shown in Figure 2–18.

> Figure 2–18: Object Names dialog box

> This dialog box displays the 4GL object names of all widgets and SmartObject instances available in the procedure file:

> - The left column contains the name of each widget and SmartObject instance.

> - The right column contains the label or title of each widget.

> To insert an object, click on it and choose OK. To insert more than one, hold down the CTRL key while selecting. The Section Editor will insert your choice at the cursor.

> ##### Filenames

> To insert a file’s pathname in the current editing area, choose Insert File Name. The Choose Insert File Name dialog box appears, as shown in Figure 2–19.

> Figure 2–19: Choose Insert File Name dialog box

> Note: This is the same dialog box that appears when you wish to insert the contents of a file rather than only a filename. Make sure of what you are doing

> To insert the file’s pathname, select the filename and choose OK. The Section Editor inserts the file’s pathname at the current cursor location in the editing area. By default, this dialog box displays all of the `.i` and `.p` files in the `src/template` directory.

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