User Tools

Site Tools


save_save_a_menu_for_restoration_.htm
Navigation:  ABC Library Reference > PopupClass > PopupClass Methods >====== Save (save a menu for restoration) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Save( menu )

blk2blue.jpg

Save Saves a menu for restoration by the PopupClass.Restore method.
menu A string constant, variable, EQUATE, or expression containing the name of the menu to save.

The Save method saves a menu for restoration by the Restore method. The Save method saves all menu attributes that the PopupClass object knows about, including associated menu actions.

Implementation: The Save method requires an INIClass object. The Init method specifies the INIClass object.

Example:

PopupMgr  PopupClass                                   !declare PopupMgr object

INIMgr    INIClass                                     !declare INIMgr object

MenuChoices EQUATE('&Save Menu|&Restore Menu|-|&Close')!declare menu definition

CODE

PopupMgr.Init(INIMgr)                !initialize PopupMgr object

PopupMgr.AddMenu(MenuChoices)        !add Popup menu

ACCEPT

 CASE FIELD()

 OF ?Save

  CASE EVENT()

  OF EVENT:Accepted

   PopupMgr.Save('MyPopup')          !save menu definition to INI

  END

 OF ?Restore

  CASE EVENT()

  OF EVENT:Accepted

   PopupMgr.Restore('MyPopup')       !restore menu from INI

  END

 END

END

See Also:     Init, Restore

save_save_a_menu_for_restoration_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1