Progress
AppBuilder
Developer’s Guide


Using the Section Editor

The AppBuilder Section Editor is a capable editing utility that offers modeless text insertion, standard Windows-style cut-and-paste, plus:

Cutting, Copying, and Pasting Text

To cut a block of text, highlight the block of text, then choose Edit Cut (shortcut: CTRL–X). The Section Editor removes the block of text from the current editing area and places it in the system clipboard.

To copy a block of text, highlight the block of text, then choose Edit Copy (shortcut: CTRL–C). The Section Editor copies the block of text and places it in the system clipboard.

Once a block of text has been cut or copied into the system clipboard, you can paste it at any current cursor location by choosing Edit Paste (shortcut: CTRL–V).

Finding and Replacing Text

Within the current editing area, you can search for and replace text strings. To search for a text string, choose Search Find (shortcut: CTRL–F). The Find dialog box appears, as shown in Figure 2–10.

Figure 2–10: Find Dialog Box

In the Find What field, type the text string that you want to find. Set search options as needed:

When you choose OK, the Section Editor searches for the first instance of the text string.

To find the next instance of the text string, choose Search Find Next (shortcut: F9). To find the previous instance of the text string, choose Search Find Previous (shortcut: SHIFT-F9).

To replace instances of the text string with a different string, choose Search Replace (shortcut: CTRL–R). The Replace dialog box appears, as shown in Figure 2–11.

Figure 2–11: Replace Dialog Box

The following search and replace features are available:

Transforming Text

A block of selected text can be indented, unindented, commented out, or uncommented by choosing Edit Format Selection, and then choosing the operation desired.

Inserting Text from Lists

The process of creating code involves entering many reserved words, identifiers, filenames, and similar tokens. The possibilities for error are numerous. To reduce error and, in most cases, save keystrokes, AppBuilder helps you insert text strings for these token types:

For each of these items, AppBuilder provides a way for you to choose or specify a text string that AppBuilder inserts into the edit buffer at your cursor location. You can access this capability by right-clicking in the editing area, or by choosing from the Insert menu.

For detailed instructions, see the "Inserting Text-string Tokens from Lists" section in this chapter.

Inserting Whole Files

You can insert (merge) the contents of a whole text file into the edit buffer at the current cursor location. This is convenient if you have used another editor to write some code that you now wish to integrate into your AppBuilder file.

To insert the contents of a text file, choose Insert File Contents. The following dialog box opens:

NOTE: Apart from the dialog box title shown by the title bar, and the end result, this is the same dialog box that appears when you choose Insert Filename. Make sure of what you are inserting.

By default, this dialog box points to the src/template directory and lists the header and superprocedure files found there. You can list different files, or files in a different directory, by selecting from the choices in the respective drop-down lists. You can edit the list of directories by choosing Edit Path, and you can add a directory without editing by selecting a file using the Browse button, which invokes the standard Open File dialog box.

Saving Your Changes

Since the Section Editor is a feature of AppBuilder rather than a separate utility, it has no Save option of its own. To save your changes, use the File Save or File Save As menu items in the AppBuilder main window. This will save all changes made to the current object, not just those you made using the Section Editor.

Undoing Your Changes

To undo all unsaved changes made to the current editing area, choose Edit Undo All. This restores the file to the state it was in when you entered this editing area.

To undo only your most recent unsaved change, choose Edit Undo. This option undoes your last edit. If you use Section Editor features such as Insert or Paste, Undo undoes the most recent action only. Successive Undo operations switch between redoing and undoing the previous edit.

Deleting Whole Sections

To delete all the non-AppBuilder code in a particular subsection (an individual Trigger, Procedure, etc.), choose Edit Delete Trigger (Procedure, etc.) The menu item text varies according to the element you are currently editing.

CAUTION: You cannot Undo the deletion of a whole subsection, such as a whole Trigger. If you use the Edit Delete subsection type function, and then change your mind, you will have to re-enter all the deleted code. It cannot be recovered by using Undo or Undo All.

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