[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
VS_Menu()            "Pull-Down" menu system

Description:

  VS_Menu() provides the programmer with a very fast and efficient means
  of producing "pull-down" menus for their users.

Syntax:     

  n_Option = VS_MENU( a_Options, ac_Title )

Pass:       

  a_Options is an nested array that contains information about each
  option on your menu.  a_Options has the following structure...

     --------------------
     Pos  Meta Symbol
     --------------------
       1  c_PullDownName
       2  a_PullDownOpts

  c_PullDownName is a character expression that should contain the
  name of the pulldown menu for that element in a_Options.

  a_PullDownOpts is a sub-array that contains information about each
  individual pulldown menu options.

  a_PullDownOpts has the following structure...

     ---------------------
     Pos  Meta Symbol
     ---------------------
       1  c_OptionName
       2  b_OptionBlock

  c_OptionName is a character expression that should contain the
  name of the option on the pulldown.

  b_OptionBlock is a code block that will be EVALuated if the user
  selects this option.

  ac_Title is an array of character expressions to display at the
  top of the menu as a "title".

Return:     

  VS_Menu() always returns NIL

Notes:      

  VERY IMPORTANT!!!!

  VS_Menu() is NOT the same as the older version of V_MENU()!!  Things
  have changed drastically.


Example:    

  FUNCTION MAIN

  LOCAL a_Menu    := {}
  LOCAL a_Options := {}
  LOCAL ac_Title  := {}

     VS_InitVern()

     AADD( ac_Title, ""                   )
     AADD( ac_Title, "Sample Menu System" )
     AADD( ac_Title, DTOC(DATE())         )
     AADD( ac_Title, ""                   )


     a_Options : {}

     AADD( a_Options, { "Clients",      {||Client() } } )
     AADD( a_Options, { "Products",     {||Product()} } )
     AADD( a_Options, { "SalesPersons", {||Sales()  } } )

     AAD( a_Menu, { "Maintenance", a_Options } )


     a_Options := {}

     AADD( a_Options, { "Client List",  {||R_Client() } } )
     AADD( a_Options, { "Product List", {||R_Product()} } )
     AADD( a_Options, { "Sales Tally",  {||R_Tally()  } } )

     ADD( a_Menu, {"Reports", a_Options } )


     a_Options := {}

     AADD( a_Options, {"Pack Databases", {||PackDbfs()}})
     AADD( a_Options, {"Re-Inex",        {||Ntx_Dbfs()}})

     AADD( a_Menu, { "Utilities", a_Options } )


     a_Options := {}

     AADD( a_Options, {"Product Info",{||ProdInfo()} } )
     AADD( a_Options, { "Quit",       {||CleanUp() } } )

     AADD( a_Menu, { "Other", a_Options } )

     VS_Menu( a_Menu, ac_Title)

  RETURN(NIL)

Usage:      

See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson