gconfirm {gWidgetsWWW2}R Documentation

Confirmation dialog

Description

Calls handler when Yes button is clicked. Unlike other gWidgets implementations, this one does not block the R process before returning a logical indicating the selection. One must use a handler to have interactivity.

Usage

gconfirm(message, title = "Confirm", icon = NULL, parent = NULL,
  handler = NULL, action = NULL, ...)

Arguments

message

message

title

title for dialog's window

icon

icon. One of 'info', 'warning', 'error', or 'question'.

parent

parent container (main window instance)

handler

handler passed to dialog if confirmed

action

passed to any handler

...

ignored

Value

return value ignored, use handler for response.

Examples

w <- gwindow()
gbutton("click me for a message", cont=w, handler=function(h,...) {
gconfirm("Do you like R", parent=w, handler=function(h,...) {
galert("Glad you do", parent=w)
})
})

[Package gWidgetsWWW2 version 0.4-8 Index]