All QA Build programs consist of the program description, which you have now created, and the procedure tree. The procedure tree is a hierarchical structure showing the procedures used by programs and the relationships between them. From the procedure tree you can see the order in which the procedures are executed and which procedures call other procedures, that is, execute other procedures as though part of their own specification. In the simplest programs there is only one procedure in the tree.
Procedures are the fundamental building blocks of QA Build programs. They are stored independently of the programs themselves. Consequently, if you have specified a procedure for one program, you may also use it in another one.
Each procedure can have:
· one main map which determines the appearance of the screen; it may also use other subsidiary maps to display messages or menus of items for selection.
· processing for one main table, specifying how the records are accessed and whether records can be added, modified or deleted; it may also retrieve data from other tables but cannot normally update them.
· processing for fields, which could include filling them with an initial value and validating user entry. These fields may represent fields in the database tables or local fields, providing temporary storage for values (they serve the same purpose as variables in conventional programming languages)
It is because each procedure is subject to these limitations that complex programs usually require many procedures.
We are going to set up a new procedure called SCREEN_HEADING
Displays a header at the top of the screen.
6. We come to Procedure Body Editing. Answer some questions about the procedure type. There are only three that matter:
· the Procedure Type. Each procedure must belong to one of the following types:
Interactive |
Data-entry procedure |
Batch |
Procedure without data entry or printing |
Menu |
A procedure offering the user a choice of actions |
A procedure that sends output to a print device |
|
Combined menu/entry |
A data entry procedure that ends when the user presses a function key to select another action |
Action bar menu |
Procedure to set up an action bar with pull-down menus |
Save/exit menu |
A procedure inviting the user to confirm or abandon changes before the database is updated (when a private database is being used |
Sub device output |
A procedure to select or send print to a different output device, and for multi-output devices |
Device select/print |
Procedure to select an output device interactively, at run-time |
Run another program |
Procedure to call another QA Build program, non-QA Build program or use a set of built-in commands |
Link to C |
Procedure which selects a procedure body written in C |
Hot key set up |
Procedure to set up hot key actions which can be called when executing subsequent procedures |
This procedure is a batch procedure because there is no user input
· the procedure is not a database procedure because it does not use the database
· the procedure does not repeat.
You can accept the default answers for the other questions.
Click on OK to confirm your selection.
1. In the Screen Design dialog to start with the Main Map field is set to 0. Press <Enter>. The focus now changes to the Map Assignment menu where the Map Number option becomes highlighted and suggests 1 (a number that has not been used in the programs mapset)
2. Press <Enter>. QA
Build asks
Create this map ? Yes
Press <Enter> to create map 1
3. The Map Assignment menu gives various facilities. You can delete or copy an existing map, use no main map or edit a map.
Map Editing
[Check the following - its probably changed] Option 7 - Edit map is highlighted. Press <Enter> to select it. The Map Edit screen appears. You are going to use the facilities of the Map Editor to create the screen heading. To do this, you will need to add some text. You can add titles, fields and icons to mapsthese and their others contents are called controls in the Map Editor.
Note: DP4 controls have properties such as the font used and the contents of a text field. They can all be changed by the user. Controls can be added to the maps using the tool box shown below.
[pic of tool box goes here]
To display the tool box, select its option on the view menu; to remove it, do the same. The tool box is a floating window. To position it, click its title bar and drag it.
Double clicking on a tool adds the corresponding control to the top-left corner of the current map. Single-clicking an icon makes a cross-hair cursor appear when you move the pointer over any open map. Position the cross-hair where you want the control, then either click to add the control at its default size or drag the mouse to add the control, sizing it yourself.
Adding Text and Titles
To add text to the map you may do either of the following:
· choose static text from the Controls option of the title bar. This creates a standard-sized text box at the top left hand corner of the map
· click on the static text icon in the tool box and move the cursor over a map where it is displayed as a cross. This cross is used to specify the size of the text field, the first click of the mouse specifies one corner of the field and releasing the button specifies the other.
4. Turn off the title bar which is limited in its display possibilities. Create a static text boxif it is the wrong size, you can easily resize itand move it to the top of the map; to move it simply click on the field and drag using the mouse to the required position. To add text to the field, double click on itthis brings up the text properties dialog from which you can change every aspect of the text box. Feel free to experiment with different fonts and effects, to produce an attractive screen heading. You might, perhaps, create something like the following:

5. When you are satisfied with your map design, save it and exit the Map Editor (both from the File menu).
6. Back in the Program Editor, you must specify the output method. Accept the default, Top of Screen, because that is exactly where we want our screen header to appear.
7. Normally Field Editing would follow, but we have not used any fields, so no field processing is necessary.