Using the Source editor
The Source editor contains the entire source code for the form, report, menu, query, or data module you’re designing. If you’re designing several files, the source for each one appears on a different tabbed page. Likewise for a .PRG file, which appears in the same editor.
Note
If you want, you can choose not to have tabbed pages in the editor but to open more than one instance of the Source editor, instead. Set this preference in the Editor Properties dialog box, Display page (Properties|Editor Properties).
To open the editor, do one of the following:
Design a new or existing form, report, menu, query, or data module. Both the design view and the editor open, with the design view having focus. Press F12 to switch focus to the editor. (If in a prior session you closed the editor, it does not open automatically with the design view, but pressing F12 will open it.)
Right-click a file in the Navigator, and choose Open In Source Editor. (Not all files have this choice.)
Open a .PRG file or text file.
Press F12 when you have a designer open (except the Table designer).
Thereafter, use F12 to toggle between design view and the code page for any given designer file. Changes made in either the Source editor or visual designer are reflected by the other when you move focus between them. Code is automatically compiled when you shift focus to the designer. If an error occurs during compilation, dBASE Plus displays an error message and points to the offending line in the file.
If an error occurs during runtime, dBASE Plus displays a dialog box, giving you the opportunity to fix the error. If you cancel the Fix dialog box, then the only copy of the work is in a temporary disk file which is placed on another page (or another instance) of the editor. You can do with this as you wish.
Two-pane window with tree view
The Source editor is a two-pane window:
The left pane is a tree view showing the hierarchy of the current file (including the this object for classes with a constructor). You can enlarge the pane, or you can hide it. To do either one, move the split bar to the left or right, using the mouse. The tree view is dynamically updated during program editing, unless the tree view is closed.
You can expand the nodes in the tree view pane by clicking the plus signs and collapse the nodes by clicking the minus signs, same as in the Windows Explorer. The expanded or collapsed state of nodes and the selected item are maintained in the tree-view pane when you take actions in the right-hand pane.
The tree view displays object bitmaps for the standard controls. You can turn this off in the Editor Properties dialog box, Display page (Properties|Editor Properties).
The right pane contains the code. Click an item in the tree view to highlight the first line of that object in code. Double-click an item in the tree view (or select it and press Tab) to jump to the start of that object in the code.
You cannot use the Source editor to select an object in the Inspector. You must do that in the design window or in the Inspector, itself.