skip to main content
OpenEdge Development: AppBuilder
AppBuilder Interface : Setting your preferences
Setting your preferences
AppBuilder offers a number of properties that you can set to better suit your personal style and preferences without going through the effort of total customization. See Appendix C, “Customizing AppBuilder,” for information on more extensive customization.
You can configure both AppBuilder’s behavior and that of the built-in Section Editor.
AppBuilder preferences
To begin setting AppBuilder preferences, choose OptionsPreferences. The dialog box opens displaying the General tab:
Table 7 describes the General preference options.
Table 7: General preference options
Create Default Window at Startup
Normally cleared. Setting this box causes AppBuilder to offer a brand new SmartWindow workspace for your use whenever it starts up. This might be especially convenient if you typically complete work on a particular window during an edit session and are ready for a fresh workspace next time. It is less useful if you normally resume work on an existing, partly completed window.
Qualify Database Fields with a Database Name
Normally cleared. AppBuilder’s output is application source code, including references to database fields. By default, such references are not fully qualified—any database that can supply the fields will be presumed to be the correct one. This can cause subtle difficulties in some circumstances. Setting this box causes AppBuilder to write out more complete references that are less prone to such errors.
Minimize Main Window while Running or Debugging
Normally cleared. Setting this box causes AppBuilder’s main window to go to an iconic state rather than stay open, when you start a test run or a debug session.
Default to Suppressing Database VIEW-AS Phrases
Normally cleared. Setting this box causes AppBuilder to generate code without including widget specifications from the Data Dictionary. If you then need to make changes in representation, you need make them in only one place (the Dictionary) rather than two (Dictionary and source).
Recently Used File List
Normally set with a default value of 4. As a convenience, the File pull-down menu includes menu items that point to the 4 most recently opened structured‑procedure files. You can open one of the files again by selecting its menu item. If you would like more or fewer than 4 files to be listed here, change the number. If you prefer that no files be listed, clear the box.
Double‑click on object for Section Editor
Normally cleared. By default, double‑clicking an object opens its Property Sheet. You can choose to open the Section Editor instead, by setting this box.
Display multiple Section Editors
Normally cleared. Setting this box allows you to have a separate Section Editor open for each open workspace. By default, a single Section Editor switches context according to which workspace has focus.
Default Function Data-Type
Normally CHARACTER. Unlike procedures, functions return a value upon termination and a call to them can, for example, appear on the right-hand side of an assignment operator. You can choose here the default data type of the value they return. It will apply to all functions defined thereafter for which you do not specify some other data type. The other choices are COM-HANDLE, DATE, DATETIME, DATETIME-TZ, DECIMAL, HANDLE, INTEGER, INT64, LOGICAL, LONGCHAR, MEMPTR, RAW, RECID, ROWID, and WIDGET-HANDLE.
Character Terminal Colors
Opens the Color Selector dialog box. Use it to set the foreground and background colors for your character‑window workspaces. See the “Colors selector and editor” section.
Advisors are dialog boxes that appear from time to time to offer advice about how to complete certain processes. Working with AppBuilder, you will most often see Advisors appear to suggest—and offer to help with—creation of SmartLinks between SmartObjects.
Cue Cards
Cue cards appear when you create SmartObjects. They offer a brief definition of the object, and hints on how to use it.
WebSpeed tab
If you have WebSpeed installed, you can use AppBuilder as your layout editor for both standard and Web applications. If you do not have WebSpeed installed, you will not see the tab in the following example:
You can change any or all of the settings here, if the default values do not meet your needs:
*Web Browser — Enter the path to the browser you wish to use for WebSpeed development. By default, AppBuilder uses the path to the browser identified in the Registry. Click Browse to open the standard Windows file system navigation tool, if you want to locate your preferred browser interactively.
*Broker URL — Enter the URL of the WebSpeed broker you will use to run your Web objects. Choosing the Test button will display a test page of broker information if the URL you enter is a valid one.
*Open new browser window for each Web-based Run — Normally set. Clear this box to re‑use a single browser window rather than generate new windows for each Web object. PSC recommends that you do not clear this box if using Netscape Navigator.
Grid Units tab
One of the hallmarks of good design is that things line up neatly. Graphic designers solved this problem by lining things up against a grid, originally printed on their workspace in a pale, cool‑blue ink that was visible to the human designer but not to the platemaking camera.
AppBuilder provides a similar grid to help you lay out your widgets neatly in the application workspace. You can make it visible to you, but it is never visible to the users of your application. The following shows the Grid Units tab:
You can choose a grid spacing in this tab. It will apply only to graphical frames; the character window has a fixed size. If you plan to run your application in both GUI and character‑cell contexts, you might wish to define your grid to be 1.0 x 1.0 characters in size, and take care not to consume more than 80 x 21 cells for any single layout.
Once you have a grid defined, choose OptionsSnap to Grid to cause your widgets to automatically jump to the closest grid intersection, if you release the widget nearby. Choose OptionsDisplay Grid to make the grid lines visible to you as a series of dots. The two options are independent of one another.
Note that any changes you make to the grid spacing here will apply only to frame objects you create afterward, not to objects that you have already created. The Snap and Display menu item settings apply immediately to all existing and future workspaces, however.
Print tab
The Print tab gives you some control over the way AppBuilder will print the source code it generates for you. The following shows the Print tab with the options available:
The Font and Page Length items are self-explanatory. If you clear the Use Print Dialog Box setting, AppBuilder will queue all subsequent print requests to the default printer immediately, without opening the Print dialog box.
Widget ID tab
The Widget ID tab enables you to specify if and how the AppBuilder assigns widget IDs to your application objects. The following shows Widget ID tab with the options available:
When Automatically assign widget IDs is checked, the AppBuilder assigns a widget ID to each new frame and object in a static container. Starting widget ID for frame is the widget ID for the first frame in a particular static container. Frame widget ID increment is the increment between the widget IDs for each new frame in a particular static container. The AppBuilder assigns widget IDs for each object in a frame in increments of 2 from the frame’s widget ID.
Section Editor preference options
The Section Editor allows you to set preferences on a per‑language basis in three broad areas:
*Color coding of tokens
*Token completion and macro expansion
*Block formatting and indentation style
In certain cases, Section Editor applies your settings to individual blocks of language statements within a file, not merely to the whole file indiscriminately. Thus, you can (for example) embed a block of JavaScript code in a file that is otherwise HTML code, and Section Editor correctly color‑codes and formats the embedded block and the surrounding blocks differently, each in the way you have specified for the particular language.
To begin configuring your Section Editor preferences, choose OptionsEditing Options. The Editing Options dialog box appears:
You can set the following preferences in this dialog:
*Extension — The Section Editor determines what settings to use for each file by looking at the filename extension. You can select particular file extensions and set different preferences for each.
*Syntax expansion — Normally set. Clearing this box prevents the Section Editor from completing partial tokens or expanding syntax macros. Example: when this box is set, if you type in IF and press CTRL+SPACE, the Section Editor inserts the rest of an IF template conforming to ABL syntax.
*Indent style — Determines the column where the new line starts after you press RETURN:
*None — Line starts in left‑most column.
*Auto — Line starts in same column as preceding line.
*Syntax indent — The Section Editor tries to determine where to start the line by taking current language syntax into account. The absolute integer field (default: 4) determines the amount of change for new levels of indenting.
*Tabs — You can specify either of the following:
*A tab interval by typing in an integer preceded by a + sign; for example, +3
*Actual tab stops by typing them in as space‑separated, ascending integers; for example, 3 5 8 11 16 20 30
*Alias filename — Enter the fully qualified filename where AppBuilder is to store alias (macro) definitions for the particular extension type. You can have as many alias files as you have languages defined. For OpenEdge file extensions, the default aliases file is p4gl.als
*Color Coding — Clicking this button opens the Color Coding Setup dialog box, described in the “Color Coding Setup dialog box” section.
*Alias — Clicking this button opens the Alias Setup dialog box, described in the “Alias setup” section.
*Options — Clicking this button opens a syntax‑specific‑formatting dialog box, described in the “Options” section.
Click Update to make your changes to these settings permanent.
Color Coding Setup dialog box
The Color Coding Setup dialog box allows you to set the color for a particular class of tokens within a particular language. You can add new tokens to the most appropriate of several lists that AppBuilder maintains for the use of the recognizer. The following shows a sample Color Coding Setup dialog box:
To set color and style for some class of token:
1. Click Colors. The Color Settings dialog box appears:
2. Check the Set Embedded language Color box, if appropriate.
3. Select the class of token from the Screen element list for which you wish to make changes. The meaning of the following two of the listed elements might not be immediately clear to you:
*Window text is any text not otherwise defined.
*Attributes (HTML only) are recognized modifiers within an HTML tag. For example, in the tag <img src="somelocation">, “src” is an attribute.
Note: There are a few categories that, while still listed, are not settable in this version of the editor: Current Line, Cursor, No Save Line, Inserted Line, Line Number, and Message.
4. Click on color swatches to set foreground and background colors, and select the radio button for style. The sample text immediately reflects your choices.
5. Click Apply to save your choices for the selected token class without also dismissing the dialog box.
6. When you have finished making changes, click OK.
Alias setup
The Section Editor has a powerful macro‑expansion capability. AppBuilder supplies predefined tokens that expand to common ABL syntactic constructs, and using these tokens can reduce your typing effort considerably. The Alias Editor dialog box provides you the means to define additional tokens that the Section Editor will later expand in the same way:
The expansion process is straightforward. For example, when you type IF and press CTRL+SPACE, the editor adds two spaces and the keyword THEN, and places the cursor between the two embedded spaces in exactly the right position for you to enter the IF test expression. Similarly, you can type in the predefined macro &FR, press CTRL+SPACE, and the editor will expand that to be {&FRAME-NAME}.
You can add additional items for automatic expansion, or even correction. If there is some typing mistake that seems to be a favorite of yours, you can enter it together with the relevant correction, and not have to worry about it any more. The transposition DIPSLAY for DISPLAY is an example of this—that error is such a popular one that PSC has already included it in the list.
To add a new expansion:
1. Click New. The Enter New Alias Name dialog box appears:
2. Type in the token to be expanded and click OK. The dialog box closes and the token appears in the list of tokens.
3. Type the expansion value into the editor. The expansion value may have multiple lines. Use %\c (percent sign, backslash, c) to represent the final position of the edit cursor, after expansion. Click OK.
In addition to being able to define an alias that will place the cursor properly, you can define aliases that prompt for completion. For example, if you still do old‑style debugging, using disclosure code, you might wish to define a disclosure message that would reveal the value of some variable at a certain point in your program.
To define a disclosure message that would reveal the value of some variable at a certain point in your program:
1. Follow Step 1and Step 2, in the previous procedure, calling the new alias PEEK.
2. Type in this expansion string: MESSAGE “At %(loc) %(var) is %(val)”.
3. Click Add in the bottom row. The Enter Alias Parameter dialog box appears:
4. Type in loc as the parameter name, and Location as the actual prompt string. You can leave Initial Value blank for this example, unless you do want some text as the initial value.
5. Repeat Step 3 and Step 4 for var and val, using Variable and Value, respectively, as the prompts. Click OK.
6. Open the Section Editor in a context suitable for testing your new alias. Type in PEEK and press CTRL+SPACE. The editor immediately opens a dialog box to prompt you for the three parameters, afterward inserting the fully expanded call to MESSAGE in place of PEEK:
The Options dialog box allows you to customize the appearance of your source code in various ways:
You can change as many of the following values as you want:
*DO/END style — Choose between having the DO block begin on the same line as the THEN token, or on the next line at the same indent level as the IF (default).
*Insert DO/END immediately — Normally cleared. Setting this box makes the editor create every IF template with an attached DO/END block.
*Insert blank line between DO/END — Normally cleared. Setting this box the editor include a blank line when creating a DO/END block.
*Minimum expandable keyword length — Choose the number of characters you must type (default: 1 character) before the editor will consider it a possible alias token. The editor will ignore CTRL+SPACE for any string with fewer characters than this.
*Use SmartPaste (TM) — Normally set. Clearing this box makes the editor ignore indentation when pasting. When SmartPaste is turned on, the editor attempts to correctly indent any text that you paste.
*Indent WHEN from CASE — Normally set. Clearing this box makes the editor put the WHEN clause at the same indent level as the enclosing CASE. The editor will normally indent WHENs by one additional level.
*Keyword Case — Normally all‑caps. Choose the style the editor uses when expanding aliases.
*Auto case Keywords — Normally set. Clearing this box makes the editor ignore differences between the Keyword Case setting and how you type keywords manually. When set, the editor changes your manual style to conform to your Keyword Case choice; for example, changing a lowercase keyword to all caps.