home *** CD-ROM | disk | FTP | other *** search
- Dynamic menu system Version 1.3 27/4/93
- By Andrew Cunningham
- Manchester Business school
-
- Email: A.cunningham@fs2.mbs.ac.uk
-
-
- Description:
-
- A heirachical menu system to link viewing and editing of Paradox tables with
- queries and reports. The details of each menu is held in a Paradox table which
- can be edited within the system to add more (or delete existing) options. Help
- text can be attached to each menu option.
-
-
- Installation:
-
- 1. Copy all files to a library directory.
- (The tables are used as a template by the system but are not essential)
- 2. Play script SY_MAKE from library directory.
- 3. Copy MENU.SC to application directory.
- 4. Edit MENU.SC :-
- set 'menu_title' = "Title for menu screen"
- set 'sys_path' = "Path to files sy*.*"
- 5. Play MENU from the application directory (the local top_level menu table
- will be created automatically).
- 6. As the Menu table is empty, you will be prompted to add records to the
- menu table. Select 'Edit current menu'. You must enter at least one
- record in the menu table.
- 7. Fill in the form (shown below). Help text can be added in the second
- page of the form.
-
- Later, more options may be added to the menu by pressing Shift-F9.
-
- The script of the menu system creates all the tables it needs if necessary. It
- is a good idea to keep a copy of the table SYS_MENU that is issued with the
- scripts as it has a form and valchecks already defined.
-
- If you are updating an old version of the dynamic menu system, you should
- erase the table SYS_MEDT and let this table be automatically regenerated. If
- you are using several copies of the calling script:- Menu.sc these must all be
- replaced or edited to reflect any changes in the new system.
-
-
- Operation:
-
- When a user selects a menu option the following actions are set in train:-
-
- 1. An initial script (if specified) is played.
- 2. The main action is performed such as:-
- Edit a table
- View a table
- play a Query & do_it!
- play a query, Pause for user mods & do_it!
- print a Report
- show another Menu
- etc.
- 3. An exit script (if present) is played.
- 4. The exit action is performed:-
- Pause - view answer table (before printing report).
- Quit - exit immediatly from menu system.
- blank - return to menu.
-
- Note: The report field defines the report to be used. If a query has been
- performed, then the report is copied from the 'result table' to the answer
- table and the answer is used for any report. For actions other than queries,
- the report table is used for the report.
-
-
- Special keys:
-
- F1 Show help text for highlighted option.
- Shft-F9 Edit current menu.
- Esc Exit to previous level.
-
-
- Menu form:
-
- Viewing Sys_menu table with form F: Record 1 of 1 Main
-
- ╔══════════════════════════════════════════════════════════════════════════════╗
- ║ Sys_menu # 1 ║
- ║ ║
- ║ Menu option title: Exit ║
- ║ Script or mini_script: ______________________________________ ║
- ║ Main table: ______________________________________ ** ║
- ║ Main Action: X ** ║
- ║ Result table: ______________________________________ ** (query) ║
- ║ Form: _ (to view or edit the main table) ║
- ║ Report: _ (to print table or answer) ║
- ║ Introductory script: ________ ║
- ║ Exit script: ________ ║
- ║ Exit action: _ ** ║
- ║ ║
- ║ ** Press F1 for look-up ║
- ║ Note: If the main action is a query, then report is associated with the ║
- ║ Answer table and copied from the table specfied in 'Result table' ║
- ║ otherwise the report from the main table is used. ║
- ║ ║
- ║ ║
- ║ ║
- ║ More.. ║
- ╚══════════════════════════════════════════════════════════════════════════════╝
-
- Page 2 of the form contains the help field associated with the menu option.
-
-
- Main Action types:
-
- Type ══════════════Description════════════════
-
- D Run DOS command/program (Script field)
-
- C Co-Edit Table in Main Table field
-
- E Edit Table in Main Table field
-
- S Play Script in Script field
-
- s Execute a miniscript in Script field
-
- p Play Query Script, auto-select PAL vars
- For type 'p', you need to create a query variables in it. The
- menu system will, for each PAL ~variable, display the relevant
- table and position the cursor in the column corresponding to
- the query's field containing the PAL variable. When the user
- presses F2, the current field value is assigned to the PAL
- variable defined by the query and the query processed.
-
- Q Play Query Script in Script field and DO_IT!
-
- P Play Query in Script field and pause for any mods
-
- R Print Table in Table field with Report in Report: field.
-
- M Call next Menu using Main Table field and change to directory
- (if specified) in Script field.
-
- V View Main Table
-
- X Exit to previous level
-
-
-
- Exit Action types:
-
- P Pause to view answer, print if F2 else return with Esc.
- Q Quit menu system
- [blank] No exit action so return
-
-
- Outline flowchart of menu operation:
-
-
- ┌───────────┐
- │Menu option│
- │ selected │
- └───────────┘
- |
- ┌─────────────────┐
- │Is there an intro│ ┌───────┐
- │ script? │---Y-->│Play it│
- └─────────────────┘ └───────┘
- | |
- N |
- |------------<---------'
- ┌──────────────┐
- │Is main action│
- ,-----<--Y------│type M (menu)?│
- | └──────────────┘
- ┌───────────────┐ |
- │Create sub_menu│ N
- └───────────────┘ |
- | ╔════════════╗
- ┌─────────────┐ ║Process main║
- │Is there data│ ║ action ║
- ,-│ in Script │ ╚════════════╝
- | │ field ? │ |
- | └─────────────┘ ┌────────────────┐ ┌──────────────┐
- N | Y │Was Esc pressed?│---Y---->│Return to menu│
- | ┌──────────┐ └────────────────┘ └──────────────┘
- | │ Change │ |
- | │ directory│ N
- | └──────────┘ |
- '-------| ┌───────────────┐ ┌──────────────────┐
- ╔═════════════╗ │Was main action│---Y-->│Copy 'family' from│
- ║Call sub_menu║ │ a query type? │ │result table to │
- ║& return here║ └───────────────┘ │answer table │
- ╚═════════════╝ | └──────────────────┘
- | N |
- '------------>--------|---------------<--------'
- ┌────────────────┐
- │Is there an exit│ ┌───────┐
- │ script? │---Y-->│Play it│
- └────────────────┘ └───────┘
- | |
- N |
- |-------------<--------'
- Note: ┌──────────────┐ ┌──────────────┐
- Exit actions are │Is Exit action│---Y-->│Pause to view │
- not used for sub- │ Pause? │ │ answer table │
- menu returns yet. └──────────────┘ └──────────────┘
- | |
- | ┌────────┐ ┌─────────┐
- N ,---<--N---│Was Esc │---Y-->│Return to│
- | | │pressed?│ │ menu │
- | | └────────┘ └─────────┘
- |------'
- ┌─────────────────┐
- │Is there a Report│ ┌────────────┐
- │ specified? │---Y-->│Print report│
- └─────────────────┘ └────────────┘
- | |
- N |
- |-------------<----------'
- ┌──────────────┐
- │Return to menu│
- └──────────────┘
-
-
- Editing the menu:
-
- The current active menu may be edited to add or change existing options by
- pressing <Shift-F9>. The following options appear:-
-
- ╔══════════════════════════╗
- ║╔═════════════════════════════════════╗
- ╠║ Edit Current Menu ║
- ║╠═════════════════════════════════════╣
- ║║ Add new menu table ║
- ║║ Edit current Menu ║
- ╚║ Add tables from another directory ║
- ║ Edit list of tables ║
- ║ Exit ║
- ╚═════════════════════════════════════╝
-
- The first option allows you to specify a table to hold the details of the
- next level menu. This should be done before editing the current menu table to
- add the next level.
-
- The next option allows you to edit the current menu (the one just
- underneath this special menu).
-
- The table fields of a menu table should have a lookup table called SY_LIST
- defined as the valcheck. Sy_list contains a list of all tables thet may be
- accessed by the menu system. Options 3 and 4 allow you to add more tables to
- the list. If you wish to add a description field to the the list of tables, you
- can do so without causing problems with the operation of the menu system. Yo
- should not change the existing field names.
-
-
- Files:
-
- SYS_MENU DB Top level menu table
- SYS_MENU F Menu edit form
- SYS_MENU VAL
- SYS_MEDT DB Menu edit table
- SYS_TYPE DB Menu action type codes lookup table
- SYS_ACTN DB Terminating action codes
- SY_LIST DB List of tables to use.
- MENU SC Initial script to start menu system
- SY_MENU SC Menu system
- SY_MAKE SC Create menu library
- AU_UTILS SC Routines from goldutl2.sc by Harry Goldman
- MENU DOC This file
-