Set values in dialog

DESCRIPTION:

Sets new values for the widgets in the specified dialog.

Note: These functions are deprecated. For more information, see .

USAGE:

dialog.setvalues(dialog, ids=<<see below>>, values=<<see below>>) 
dialog.reset(dialog, ids) 

REQUIRED ARGUMENTS:

dialog
an object of class dialog, as returned by the dialog.create function.
ids
an integer vector giving the widget ID numbers for the desired widgets. The widget ID numbers are indices in the values argument as supplied to the original dialog.create function call.

OPTIONAL ARGUMENTS:

values
a list giving the new values for the specified widgets. The default is to reset the specified widgets to their initial values from the dialog.create call. The new values are converted to usable values, if necessary. For widgets with minimum or maximum values, the value is changed to the nearest range endpoint if it is out of range. For exclusive choice widgets (like pulldown, radiobox, list), abbreviations are used. If there is no exact match for the specified value, the first choice for which the value is an abbreviation is used.

VALUE:

Returns the specified values list.

DETAILS:

The dialog.reset function is just a shorthand for specifying dialog.setvalues with no values argument.

SEE ALSO:

,

EXAMPLES:

state.dialog <- 
 dialog.create (list(State=dimnames(state.x77)[[1]], 
                     Statistic=dimnames(state.x77)[[2]], 
                     Value=state.x77[[1,1]]), 
                widgets=c('list', '', 'textfield'), 
                buttons=c('OK','Reset')) 
dialog.popup (state.dialog) 
dialog.setvalues (state.dialog, c(1,3), 
                  list('Washing', state.x77[['Washington',1]])) 
button <- dialog.getbutton (state.dialog) 
if(button == 'OK') { 
  new.state <- unlist(dialog.getvalues(state.dialog,1)) 
  new.stat  <- unlist(dialog.getvalues(state.dialog,2)) 
  dialog.setvalues (state.dialog, 3, 
                    state.x77[[new.state, new.stat]]) 
} else if(button == 'Reset') dialog.reset(state.dialog)