Menu Detail Screen

Each menu record contains Detail information that describes each item, or selection, that is placed in the menu. When you select "Detail" from the Menu Editor Options menu, the Detail form is displayed.

A copy of this form is completed for each item in the menu. It is simple, quick, and most of the parameters default to selections made in the Header screen. When an item is completed, press <Accept>. Then, select a fresh screen to Add, Change, Delete, or Insert additional items in the menu record.

Items in the menu appear in the sequence they are entered. For example, the first item entered in a vertical menu appears at the top. To change the sequence, make a note of the Detail parameters, delete the item, and insert it in the correct sequence.

Menu Detail Screen Parameter Descriptions

Item<Jump>

This parameter is the text to be displayed on the menu as an item to be selected.

Highlight

Enter the character position in the "Item" string (above) to highlight and use as the selection character for this item.

Action Types, Action Names, and Action

These three fields of the Detail screen are best understood when taken together. The "Action Type" parameter determines what happens when the user selects this detail item from the menu. "Action Name" and "Action Parameter" provide additional information when it is needed to carry out the Action Type chosen.

The "Action Name" gives the Menu System the name to call a submenu, CALL another program, RUN another program, or RUN an operating system command. The Action Parameter further qualifies the Action Name. The following list is ordered based on "Action Type".

Action Type

Description

0

Value. Return the value of this menu item to the program. The value is the position of the detail item within the menu. Action Name and Action Parameter are ignored.

1

Value, Clear. Return the value and clear the menu window from the screen. Action Name and Action Parameter are ignored.

2

Call a submenu. This calls the menu file specified in Action Name using the menu record named in Action Parameter.

3

Call a Program. This CALLs the program specified in Action Name (optionally with a single parameter) specified in Action Parameter. Action Name must contain the full pathname of the program. The use of global strings is recommended.

4

Reserved for internal use.

5

Call a Program in a full-screen window. This is identical to Action Type 3, but it first creates a full-screen window.

6

RUN a program. This RUNs the program specified in Action Name. A parameter can be passed to the program via Action Parameter. This parameter is loaded to the global string (#MENU_PARAMETER). Use care when RUNning programs to ensure they return properly to the Menu System. A global string (#MSRUN) is loaded prior to RUNning a program and should be cleared before returning to the Menu System.

7

Shell Call. The values in Action Name and Action Parameter are concatenated and passed to an operating system shell.

8

Release PRO/5. Be sure you really want to do this! If an integer is specified in Action Parameter, it is passed as a return code to the operating system.

With actions 3, 5, 6, and 7, an Action Parameter containing only a "?" will prompt the user interactively for the parameter. For example, assuming a detail selection called Print Invoices, the prompt looks like:

Print Invoices Parameter:

Modify the prompt by specifying Action Parameter as "?prompt string". For example, an action parameter of "?Enter Invoice Print Date:" gives a prompt of:

Enter Invoice Print Date:

Color

This parameter is the display color of the main text of this item, based on Color Codes. Users can press <SEARCH> to select from the color table.

Select

This parameter is the color of the selection character based on Color Codes. Users can press <SEARCH> to select from the color table.

Display Col

This parameter is used to override the calculated column position or the column given in the Header screen for this item.

Display Row

This parameter is used to override the calculated row position or the row given in the Header screen for this item.

Prompt

This parameter is the message to be displayed at the bottom of the screen for this item.

Helpfile

This parameter is a string expression that names the file to be called when the user presses <HELP> while in this menu item. If the string expression is specified in either of the two formats shown below, then the global string (HELPFILE) is used to locate an ASCII help-screen file. Use format 1 to access an indexed helpfile. Use format 2 to access a searchable helpfile.

helpfile@key

Indexed ASCII help file

helpfile;helpitem

Searchable ASCII help file

If neither format 1 or 2 is used, or if the global string (HELPFILE) does not specify the path to the indexed helpfile, the helpfile is presumed to be a TAOS form.

Security

This parameter is the security code assigned to this detail item of the menu. The maximum length is 18 characters. Any alphanumeric or punctuation character may be entered. This value is compared to the (SECURITY) global when the user attempts to select this item. If any character matches, or if this field is null, access is allowed. For more information, see below.

The Menu Security system consists of the following components:

Detail Security Code

This code establishes the level of authorization required to select a menu item. The Security code is entered in the Security parameter of the Detail screen. Any printable character on your keyboard may be entered. The code is case sensitive.

When the user attempts to select the menu item, this code is compared to the (SECURITY) global string. If any character matches, or if the Security code is null, access is permitted. Otherwise, access is denied and the warning message "Not authorized for access!" is displayed.

(SECURITY) Global

This code establishes the authorization level of the user. It must be determined by the developer and set into the (SECURITY) global in the configuration file or in the initialization routine of your application. For example:

A$="G4*a"
let dummy$=stbl("SECURITY",A$)

The EUS Toolkit builds a separate string table each time it is invoked, and setting the (SECURITY) global will not affect other users.

QUIET_SECURITY) Global

This Boolean global overrides the warning message normally issued when access to a menu item is denied.

The Menu Security system enables you to protect the menus in your application with security codes. You can (optionally) assign a security code to each item in a menu. The security code may contain any printable character on your keyboard. On most keyboards, this permits approximately 90 different codes to be entered.

Typically, a security code is assigned to a specific item in a menu that only authorized users may select. Menu security implies that the developer provides a way of establishing the user's authorization. This can be done by using _ask.utl with the "Q" argument in ARGS$, or by requiring the user to perform a predetermined set of actions. The STBL() function is then used to set the user's authorization code into the (SECURITY) global string. PRO/5 builds a separate string table each time it is invoked, and setting the (SECURITY) global will not affect other users. For example:

A$="G4*a"
let dummy$=stbl("SECURITY",A$)

When the user selects the "Salary" field in the menu, the value of the Security parameter for the menu item is compared to the (SECURITY) global string. If any character matches, or if the Security parameter is null, access is permitted. Otherwise access is denied.

When access is denied, the warning message "Not authorized for access!" is normally displayed. This can be overridden by enabling the global Boolean (QUIET_SECURITY) in the configuration file.