home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / data / dbas / 003 / menu.doc < prev    next >
Encoding:
Text File  |  1993-04-27  |  11.6 KB  |  266 lines

  1. Dynamic menu system Version 1.3 27/4/93
  2. By Andrew Cunningham
  3. Manchester Business school
  4.  
  5. Email: A.cunningham@fs2.mbs.ac.uk
  6.  
  7.  
  8. Description:
  9.  
  10.   A heirachical menu system to link viewing and editing of Paradox tables with
  11. queries and reports.  The details of each menu is held in a Paradox table which
  12. can be edited within the system to add more (or delete existing) options.  Help
  13. text can be attached to each menu option.
  14.  
  15.  
  16. Installation:
  17.  
  18.   1. Copy all files to a library directory.
  19.      (The tables are used as a template by the system but are not essential)
  20.   2. Play script SY_MAKE from library directory.
  21.   3. Copy MENU.SC to application directory.
  22.   4. Edit MENU.SC :-
  23.       set 'menu_title' = "Title for menu screen"
  24.       set 'sys_path'   = "Path to files sy*.*"
  25.   5. Play MENU from the application directory (the local top_level menu table
  26.      will be created automatically).
  27.   6. As the Menu table is empty, you will be prompted to add records to the
  28.      menu table. Select 'Edit current menu'.  You must enter at least one
  29.      record in the menu table.
  30.   7. Fill in the form (shown below).  Help text can be added in the second
  31.      page of the form.
  32.  
  33.   Later, more options may be added to the menu by pressing Shift-F9.
  34.  
  35.   The script of the menu system creates all the tables it needs if necessary. It
  36. is a good idea to keep a copy of the table SYS_MENU that is issued with the
  37. scripts as it has a form and valchecks already defined.
  38.  
  39.   If you are updating an old version of the dynamic menu system, you should
  40. erase the table SYS_MEDT and let this table be automatically regenerated.   If
  41. you are using several copies of the calling script:- Menu.sc these must all be
  42. replaced or edited to reflect any changes in the new system.
  43.  
  44.  
  45. Operation:
  46.  
  47. When a user selects a menu option the following actions are set in train:-
  48.  
  49.              1. An initial script (if specified) is played.
  50.              2. The main action is performed such as:-
  51.                     Edit a table
  52.                     View a table
  53.                     play a Query & do_it!
  54.                     play a query, Pause for user mods & do_it!
  55.                     print a Report
  56.                     show another Menu
  57.                          etc.
  58.              3. An exit script (if present) is played.
  59.              4. The exit action is performed:-
  60.                     Pause - view answer table  (before printing report).
  61.                     Quit  - exit immediatly from menu system.
  62.                     blank - return to menu.
  63.  
  64. Note: The report field defines the report to be used. If a query has been
  65. performed, then the report is copied from the 'result table' to the answer
  66. table and the answer is used for any report.  For actions other than queries,
  67. the report table is used for the report.
  68.  
  69.  
  70. Special keys:
  71.  
  72.          F1       Show help text for highlighted option.
  73.     Shft-F9       Edit current menu.
  74.         Esc       Exit to previous level.
  75.  
  76.  
  77. Menu form:
  78.  
  79. Viewing Sys_menu table with form F: Record 1 of 1                   Main
  80.  
  81. ╔══════════════════════════════════════════════════════════════════════════════╗
  82. ║                                                          Sys_menu    #     1 ║
  83. ║                                                                              ║
  84. ║ Menu option title:      Exit                                                 ║
  85. ║ Script or mini_script:  ______________________________________               ║
  86. ║ Main table:             ______________________________________  **           ║
  87. ║ Main Action:            X   **                                               ║
  88. ║ Result table:           ______________________________________  ** (query)   ║
  89. ║ Form:                   _         (to view or edit the main table)           ║
  90. ║ Report:                 _         (to print table or answer)                 ║
  91. ║ Introductory script:    ________                                             ║
  92. ║ Exit script:            ________                                             ║
  93. ║ Exit action:            _   **                                               ║
  94. ║                                                                              ║
  95. ║  ** Press F1 for look-up                                                     ║
  96. ║  Note: If the main action is a query, then report is associated with the     ║
  97. ║        Answer table and copied from the table specfied in 'Result table'     ║
  98. ║        otherwise the report from the main table is used.                     ║
  99. ║                                                                              ║
  100. ║                                                                              ║
  101. ║                                                                              ║
  102. ║                                                                 More..       ║
  103. ╚══════════════════════════════════════════════════════════════════════════════╝
  104.  
  105.   Page 2 of the form contains the help field associated with the menu option.
  106.  
  107.  
  108. Main Action types:
  109.  
  110. Type    ══════════════Description════════════════
  111.  
  112.   D     Run DOS command/program (Script field)
  113.  
  114.   C     Co-Edit Table in Main Table field
  115.  
  116.   E     Edit Table in Main Table field
  117.  
  118.   S     Play Script in Script field
  119.  
  120.   s     Execute a miniscript in Script field
  121.  
  122.   p     Play Query Script, auto-select PAL vars
  123.         For type 'p', you need to create a query variables in it.  The
  124.         menu system will, for each PAL ~variable, display the relevant
  125.         table and position the cursor in the column corresponding to
  126.         the query's field containing the PAL variable.  When the user
  127.         presses F2, the current field value is assigned to the PAL
  128.         variable defined by the query and the query processed.
  129.  
  130.   Q     Play Query Script in Script field and DO_IT!
  131.  
  132.   P     Play Query in Script field and pause for any mods
  133.  
  134.   R     Print Table in Table field with Report in Report: field.
  135.  
  136.   M     Call next Menu using Main Table field and change to directory
  137.         (if specified) in Script field.
  138.  
  139.   V     View Main Table
  140.  
  141.   X     Exit to previous level
  142.  
  143.  
  144.  
  145. Exit Action types:
  146.  
  147.            P       Pause to view answer, print if F2 else return with Esc.
  148.            Q       Quit menu system
  149.         [blank]    No exit action so return
  150.  
  151.  
  152. Outline flowchart of menu operation:
  153.  
  154.  
  155.                            ┌───────────┐
  156.                            │Menu option│
  157.                            │ selected  │
  158.                            └───────────┘
  159.                                  |
  160.                           ┌─────────────────┐
  161.                           │Is there an intro│       ┌───────┐
  162.                           │   script?       │---Y-->│Play it│
  163.                           └─────────────────┘       └───────┘
  164.                                 |                      |
  165.                                 N                      |
  166.                                 |------------<---------'
  167.                            ┌──────────────┐
  168.                            │Is main action│
  169.            ,-----<--Y------│type M (menu)?│
  170.            |               └──────────────┘
  171.     ┌───────────────┐            |
  172.     │Create sub_menu│            N
  173.     └───────────────┘            |
  174.            |                 ╔════════════╗
  175.      ┌─────────────┐         ║Process main║
  176.      │Is there data│         ║  action    ║
  177.    ,-│ in Script   │         ╚════════════╝
  178.    | │ field ?     │             |
  179.    | └─────────────┘       ┌────────────────┐         ┌──────────────┐
  180.    N       | Y             │Was Esc pressed?│---Y---->│Return to menu│
  181.    |  ┌──────────┐         └────────────────┘         └──────────────┘
  182.    |  │  Change  │               |
  183.    |  │ directory│               N
  184.    |  └──────────┘               |
  185.    '-------|               ┌───────────────┐       ┌──────────────────┐
  186.      ╔═════════════╗       │Was main action│---Y-->│Copy 'family' from│
  187.      ║Call sub_menu║       │ a query type? │       │result table to   │
  188.      ║& return here║       └───────────────┘       │answer table      │
  189.      ╚═════════════╝             |                 └──────────────────┘
  190.            |                     N                        |
  191.            '------------>--------|---------------<--------'
  192.                           ┌────────────────┐
  193.                           │Is there an exit│       ┌───────┐
  194.                           │   script?      │---Y-->│Play it│
  195.                           └────────────────┘       └───────┘
  196.                                 |                      |
  197.                                 N                      |
  198.                                 |-------------<--------'
  199.      Note:                ┌──────────────┐       ┌──────────────┐
  200.    Exit actions are       │Is Exit action│---Y-->│Pause to view │
  201.   not used for sub-       │  Pause?      │       │ answer table │
  202.   menu returns yet.       └──────────────┘       └──────────────┘
  203.                                 |                      |
  204.                                 |                 ┌────────┐       ┌─────────┐
  205.                                 N      ,---<--N---│Was Esc │---Y-->│Return to│
  206.                                 |      |          │pressed?│       │ menu    │
  207.                                 |      |          └────────┘       └─────────┘
  208.                                 |------'
  209.                           ┌─────────────────┐
  210.                           │Is there a Report│       ┌────────────┐
  211.                           │  specified?     │---Y-->│Print report│
  212.                           └─────────────────┘       └────────────┘
  213.                                 |                        |
  214.                                 N                        |
  215.                                 |-------------<----------'
  216.                           ┌──────────────┐
  217.                           │Return to menu│
  218.                           └──────────────┘
  219.  
  220.  
  221. Editing the menu:
  222.  
  223.  The current active menu may be edited to add or change existing options by
  224. pressing <Shift-F9>.  The following options appear:-
  225.  
  226.                  ╔══════════════════════════╗
  227.                  ║╔═════════════════════════════════════╗
  228.                  ╠║          Edit Current Menu          ║
  229.                  ║╠═════════════════════════════════════╣
  230.                  ║║  Add new menu table                 ║
  231.                  ║║  Edit current Menu                  ║
  232.                  ╚║  Add tables from another directory  ║
  233.                   ║  Edit list of tables                ║
  234.                   ║  Exit                               ║
  235.                   ╚═════════════════════════════════════╝
  236.  
  237.  The first option allows you to specify a table to hold the details of the
  238. next level menu.  This should be done before editing the current menu table to
  239. add the next level.
  240.  
  241.  The next option allows you to edit the current menu (the one just
  242. underneath this special menu).
  243.  
  244.  The table fields of a menu table should have a lookup table called SY_LIST
  245. defined as the valcheck.  Sy_list contains a list of all tables thet may be
  246. accessed by the menu system.  Options 3 and 4 allow you to add more tables to
  247. the list.  If you wish to add a description field to the the list of tables, you
  248. can do so without causing problems with the operation of the menu system.  Yo
  249. should not change the existing field names.
  250.  
  251.  
  252. Files:
  253.  
  254. SYS_MENU DB   Top level menu table
  255. SYS_MENU F    Menu edit form
  256. SYS_MENU VAL
  257. SYS_MEDT DB   Menu edit table
  258. SYS_TYPE DB   Menu action type codes lookup table
  259. SYS_ACTN DB   Terminating action codes
  260. SY_LIST  DB   List of tables to use.
  261. MENU     SC   Initial script to start menu system
  262. SY_MENU  SC   Menu system
  263. SY_MAKE  SC   Create menu library
  264. AU_UTILS SC   Routines from goldutl2.sc by Harry Goldman
  265. MENU     DOC  This file
  266.