When You Create or Add Menu files

Sometimes an application must use more than one menu file to provide access to all of its menu options. If an applicationís menus need to change at various points in the execution of the application, calling a new menu file is usually the best way to make the change.

You can create new menu files for an application or add existing menu files to an application through the VPM Enterprise Menu Builder. The Building Menus chapter of the Userís Guide shows you how.

However, creating or adding a menu file to the VPM Enterprise Menu Builder is only part of what you must do to get the menu into your application. You must also insert code into your application to call the menu file when it is needed.

The following are examples of situations that require more than one menu file. Some situations may require only modification of the existing menu bar while others require total replacement of the menu.

∑       In some applications the menu pads that should appear depend on some condition -- say, whether the user is the system supervisor. In this case, the menu pads that apply to all users could be included in the applicationís main menu. Then, the menu pads that depend upon whether the user is the system supervisor could be included in a separate supervisorís menu created through the Menu Builder. Upon application log on, if the user is detected to be the supervisor, the supervisorís menu would be run to add the supervisorís menu pads to the main menu bar.

∑       In some complex applications, main menu options run sub-applications that must replace the main menu. Upon completion of the sub-applications, the main menu must be restored. For example, a Human Resources systemís main menu might allow users to choose to run Personnel, Payroll or Benefits sub-applications that each require very different menus. In this case, each of the sub-applications could have its own menu that would be run when it is chosen from its main menu prompt. Upon completion of the Personnel, Payroll or Benefits applications, the main Human Resources menu would be restored.

You can create as many menu files through the VPM Enterprise Menu Builder as an application needs. Of course, you must insert code in your application to call each menu when it is needed. The next section, Calling Menus, shows you how you can call a new menu and, perhaps, restore the prior menu when the use of the new menu is completed.

More:

Calling Menus