MyPanelValidateInputA control panel extension must respond to the
kPanelValidateInputSelectrequest code. A control panel sends this request code to your extension whenever the user clicks a control panel's close box. A control panel extension typically responds to the
kPanelValidateInputSelectrequest code by calling an extension-defined subroutine (for example,
MyPanelValidateInput) to handle the request.
FUNCTION MyPanelValidateInput (globals: Handle; VAR ok: Boolean) : ComponentResult;
- A handle to the control panel extension's global data.
- On return, a Boolean value that indicates whether the panel's current values are valid (
TRUE) or invalid (
MyPanelValidateInputfunction should perform any processing necessary to validate the current settings in the panel. For example, if your panel contains any editable text items, you might need to ensure that the text they contain makes sense. The control panel calls this function when the user clicks the control panel's close box.
If the current settings of the panel items are acceptable, set the
TRUEbefore returning from
MyPanelValidateInput. If the current settings are not valid, set
FALSE. When you set
FALSE, the control panel ignores any of the user's subsequent clicks in the panel's OK button.
MyPanelValidateInputfunction should return
noErrif successful, or an appropriate result code otherwise.