General: Specifying No Sub-Form

If you do not specify a sub-form in the Designer or in your mnf_def() call, your action function must determine whether the desired form is in memory, and then, if necessary, read the form from the Designer library or define the form in code. If the form is stored in a Designer library, you will need to hard-code the name of the sub-form in your action function, or pass it into the function by using user pointers.

Because you did not specify the sub-form name or a pointer to the sub-form, your action function cannot call FORMCALL() or MENUCALL() to process the form. Use the more common fm_proc() and mn_proc() functions, or use fm_up(), fm_rd() and fm_dn() or mn_up(), mn_rd() and mn_dn().

If this is a modal form, you may wish to free the form before returning from the action function. If you do not free the form in your action function, it is your responsibility to free it later.

If this is a non-modal form, freeing the form in the action function causes an error. You can use the window option AUTOFREE to have Vermont Views free the form automatically, or you can free it at some other point in your code. For more information on non-modal programming, see Chapter 30, "Differences in Non-Modal Form Processing."


Home Contents Previous Next