Skip to content

bypassing the R.app help browser?

1 message · John Fox

#
Dear Brian, Peter, and Simon,

As I explained, I removed the call to tkwait.window() in Rcmdr modal
dialogs, and I've now had a chance to test the consequences. AFAICS, in
almost all cases, the change is benign. Because control is returned to the R
command prompt before a dialog closes, there is the possibility that a user
will put R in a state that produce an error (e.g., erasing a data set that
existed when the dialog opened), but that seems to me unlikely.

In some cases, however, when the OK button is pressed in a dialog, another
dialog opens, and, to work properly, the function dispatched by the OK
button should wait until the second dialog closes, since it requires
information supplied by the user in the second dialog. Removing
tkwait.window() from the second dialog produces an error in this
circumstance. I've therefore introduced an optional force.tkwait argument,
which defaults to FALSE, to the Rcmdr dialogSuffix() macro; setting the
argument to TRUE in a secondary dialog solves the problem that I outlined. 

With these changes, I think that the Rcmdr now behaves correctly on all
platforms, permitting, e.g., help pages to display properly under Mac OS X
and in RStudio.

Thanks to everyone who addressed this problem,
 John