Managing a Dialog with map_get_inputs()

Using map_get_inputs() helps ensure your programs' dialogs work with a consistent user interface. It also reduces the amount of clutter in your code.

Before discussing map_get_inputs() it will help if you understand more about how dialogs work in DP4:

Overview of map_get_inputs()

map_get_inputs() is usually responsible for displaying the map a dialog will use, initialising various global variables ready for the dialog and then calls your callback function to process each field in turn.

Your callback function may be used in two distinct phases:

When the user completes or cancels the dialog map_get_inputs() will return, after performing various (optional) cleaning up operations, such as clearing the dialog map and restoring global variables.

An example of using map_get_inputs() together with pick_record() can be found next.