Writing Your Own Menu Action Functions

You can specify your own menu action function for a menu field, either in the mnf_def() call or in the "Menu Field Basic Information" dialog box in the Designer. You can build your action function around the action functions provided by the system or create your own.

The action function sets the next menu level by its return value. Possible return values are listed in Table 33.1, "Action Function Return Values," at the beginning of this chapter. If a fatal error, such as lack of memory, is encountered, the action function should return a FUNCERROR. The menu processing function will make an immediate error return when an action function returns FUNCERROR.

An action function can perform any task, from displaying data forms and menus to changing menu options on its calling menu or other menus in the menu tree. The most common use of an action function is to display and process either a data form or another, lower-level menu.


Home Contents Previous Next