version 2003
PA_ModalDialog (dialog; lastVarName) char
| Parameter | Type | Description | |
| dialog | PA_Dial4D | Dialog reference | |
| lastVarName | char* | Name of the last modified variable | |
| Function result | char | 1 = User accepts the dialog, | |
| 2 = User cancels the dialog, | |||
| 0 = A variable has been modified |
Description
The routine PA_ModalDialog is called repetitively in a loop after having displayed a dialog (by calling PA_NewDialog and then PA_OpenDialog). It provides information on the last user action. If the user validates the dialog, PA_ModalDialog returns 1. If the user cancels the dialog, PA_ModalDialog return 2. If the user modifies any variable that does not validate or cancel the dialog, PA_ModalDialog returns 0.
dialog is the dialog reference, as returned by PA_NewDialog or PA_OpenDialog.
lastVarName is the name of the last modified variable.
By default, PA_ModalDialog fills lastVarName with a null terminated C string, unless you have previously called the PA_UsePStrings functions.
By default, PA_ModalDialog fills lastVarName with Macintosh characters on Macintosh and ANSI characters under Windows, except if you have previously called the PA_UseMacCharacters or PA_UseAnsiCharacters function.
Example
See PA_NewDialog and 4th Dimension Dialogs : using a Form as a dialog for an example of use.
See Also
PA_CloseDialog, PA_NewDialog, PA_OpenDialog.
Error Handling
None.