Field Help

Field help is displayed by creating help keys and popup menu items, calling field triggers, formatting the 'help text' into lists, and displaying the lists. The following example is used to tell the user that there are two methods of shipping a chemical sample.
  1. Creating help keys, menus and popups to set g.keys.....
    • To create a help key the following lines must be added to *.kma ...
    • To create a help item in a popup menu ...
  2. Calling the field trigger:
      else {                                    /* normal mode                    */
        input(G.input_var);
        ...
        if (G.key == key_f1) ...
        else if (G.key == key_f2)...
        else if ...
        else if (G.key in (key_help,key_lov)){
          key_exec(G.key);
          }
        else if ...
          }
        }                                       /* normal mode                    */
    
  3. Formatting 'help text' into lists and displaying a 'help window':
    {
    trigger help= {
      list mail_lst;
      mail_lst= list_open("27",3, "Ship: Shipment Priority");
      list_mod(mail_lst,1,"R: Routine, 1 week delivery");
      list_mod(mail_lst,1,"E: Express, 1 day delivery");
      list_mod(mail_lst,1,"Format: C | LOV: [F11]");
      list_view3(mail_lst,-1,-1,-1,key_f3,opt_highlight,0);
      mail_lst= NULL;
      };
    ;
    }