
R/dlg_input.tcltkGUI.R
dlg_input.RdPrompt for some data in a modal dialog box.
# S3 method for class 'tcltkGUI'
dlg_input(message = "Enter a value", default = "", ..., gui = .GUI)The string the user wrote in the dialog box.
library(svDialogstcltk) # Tcl/Tk dialog boxes are now used by default
if (FALSE) { # \dontrun{
# Ask something...
user <- dlg_input("Who are you?", Sys.info()["user"])$res
if (!length(user)) {# The user clicked the 'cancel' button
cat("OK, you prefer to stay anonymous!\n")
} else {
cat("Hello", user, "\n")
}
} # }