Try looking at the tkwait.window function, it may be what you need. Create your tkwindow with all its components, then call tkwait.window on the toplevel window and the calling function will wait until that window goes away before continuing execution.
Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Annis, P.E. Sent: Saturday, July 08, 2006 11:11 AM To: [email protected] Subject: [R] another tcl/tk query Greetings: I wish to use a tcl/tk widget to ask for user-selected parameter values. My widget works - it asks for and returns to my workspace the stuff I need. Here is a snippet of my code: ############################### OnOK <- function() { LOG.X <<- as.logical(as.character(tclvalue(log.X.buttonValue))) LOG.Y <<- as.logical(as.character(tclvalue(log.Y.buttonValue))) natural.units.â.decision <<- as.double(as.character(tclvalue(â.decision))) natural.units.left.censor <<- as.double(as.character(tclvalue(left.censor))) natural.units.right.censor <<- as.double(as.character(tclvalue(right.censor))) tkdestroy(t2) } ############################### My problem is this: I would like to use the new input in the same routine that created, used, and destroyed the widget. I can't seem to do that. The routine executes with what it has. I must wait for the calling routine to end before I can use the new info, which is correctly place in the workspace, in subsequent R routines. Is there a way I can use the updated values in the same routine that created the widget? Thanks for your advice - and patience. Charles Annis, P.E. PS - I did read Prof. Ripley's post of Wed 8/31/2005 "Re: [R] tcl/tk return problem" but was unable to benefit from it. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
