Generic function
Exits the specified dialog.
exit-dialog dialog #key destroy? => ()
<dialog-frame>.
<boolean>. Default value: #t.
None
duim-frames
duim-frames
Exits dialog, recording any changes to the information displayed in the dialog that have been made by the user.
This is the default callback used for the exit button in a dialog. This is the button that is typically labeled OK.
If destroy? is #t, then dialog is destroyed.
The following example defines a button, *yes-button*, that calls exit-dialog as its activate-callback. This button is then used in a dialog that simply replaces the standard exit button for the newly defined dialog. Note that the example assumes the existence of a similar *no-button* to replace the cancel button.
define variable *yes-button*
= make(<push-button>, label: "Yes",
activate-callback: exit-dialog,
max-width: $fill);define variable *dialog*
= make(<dialog-frame>,
exit-button?: #f,
cancel-button?: #f,
layout: vertically
(x-alignment: #"center",
y-spacing: 5)
make(<label>,
label: "Here is a label");
horizontally (x-spacing: 2)
*yes-button*;
*no-button*;
end
end);start-frame(*dialog*);