Using Action Codes in Event Functions

Action codes are used by the system event functions as a way for event functions and the processing functions to communicate. They are used extensively in all processing systems, including form processing, menu processing, window processing and choice list processing.

Your event function can return an action code as discussed above to inform the processing function about what action to take.

Many Vermont Views functions also set action codes to inform the processing function about what action to take. kd_nextitem(), for example, sets the next action code for the form to indicate that the processing function should move to the next item on the form.

In the data form processing system and the menu processing system, provisions are made so that you can set action codes in your event functions with sfm_nextitem(). Data form action codes are explained in Chapter 34, "Getting and Updating Data in the Form." Menu processing action functions are explained in Chapter 33, "Writing Menu Action Functions."

Other action codes for forms and menus, and action codes for other processing systems, are generally internal. You should call the existing event functions within your own event functions instaed of trying to set the next action code directly.


Home Contents Previous Next