The function abort-exit-confirmer
can be used to abort the exiting of a confirmer. It can be used in the
ok-function
of a confirmer, to abort the exit and return to the dialog.
If abort-exit-confirmer
is called outside the exiting of a confirmer, it does nothing.
This example asks the user for a string. If the string is longer than 20 characters, it confirms with the user that they really want such a long string, and if they do not it returns to the dialog.
(capi:popup-confirmer
(make-instance 'capi:text-input-pane)
"New Name"
:value-function 'capi:text-input-pane-text
:ok-function
#'(lambda (value)
(when (and (> (length value) 20)
(not (capi:prompt-for-confirmation
"Name is very long. Use it?")))
(capi:abort-exit-confirmer))
value))
CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017