Using a Menu System that Calls Data Forms

If you are creating a menu system that calls data forms, you can use one of two ways to call and process a data form that is associated with a menu field:

If you are using FORMCALL() and you wish to read all data forms associated with a menu at the same time as the menu, you will need to do the following:

You can use menu selections in the Designer to do most of these steps. Select
INTERFACE->Data structures to generate the data structures for each data form. Select INTERFACE->Function list to generate the function list and function prototypes for forms in the library. Select INTERFACE->Main program to generate the prototype main(). If you have specified FORMCALL() as the action function used to call the associated data forms, the prototype main() contains all the code for declaring and initializing data form variables, creating the data form information array, and calling dl_mnget() with the correct parameters.

If you are writing your own action function instead of using FORMCALL(), you do not need to do any of the extra steps described in this section. It is not necessary to read in the data forms when you read the menus. Your action function can call dl_fmget() to read the form before using it. You can use the Main Generator to generate the code needed to read and process the data form. See Chapter 33, "Writing Menu Action Functions," to learn more about writing menu action functions.

More:

Creating the Data Form Information Array


Home Contents Previous Next