Wait for button press in dialog

DESCRIPTION:

Changes the current dialog to the one specified, then waits for one of the buttons along the bottom of the dialog to be pressed.

Note: This function is deprecated. For more information, see .

USAGE:

dialog.getbutton(dialog) 

REQUIRED ARGUMENTS:

dialog
an object of class dialog, as returned by the dialog.create function.

VALUE:

Returns a character string that is the label of the button that was pressed.

If the user selected the window manager function to delete the window, the return value from this function is "DeleteWindow" and a dialog.popdown is performed. Different window managers have different ways of invoking this functionality. For example, mwm uses the function name f.kill and twm uses f.delete to invoke the WM_DELETE_WINDOW protocol. With mwm, this is usually bound to the "Close" item in the window's title bar menu.

SIDE EFFECTS:

Changes the "current" dialog in the dialog handling system. Does a dialog.popup on the dialog. Causes S-PLUS evaluation to stop until a button is pressed in the specified dialog.

DETAILS:

This function is called by dialog.display as part of its operation. Normal usage of displaying a dialog and waiting for an answer should be done with dialog.display .

REFERENCES:

Nye, Adrian (ed) (1990). X Protocol Reference Manual O'Reilly & Associates, Inc. Sebastopol, California USA

SEE ALSO:

, , ,

EXAMPLES:

# Display some dialogs 
dialog.popup(dialog1) 
dialog.popup(dialog2) 
# Wait for user to hit a button in dialog1 
button1 <- dialog.getbutton(dialog1)