Re: [R] another tcl/tk query

From: Greg Snow <Greg.Snow_at_intermountainmail.org>
Date: Tue 11 Jul 2006 - 03:52:54 EST


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
greg.snow@intermountainmail.org
(801) 408-8111
 

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Charles Annis, P.E.
Sent: Saturday, July 08, 2006 11:11 AM
To: r-help@stat.math.ethz.ch
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. Charles.Annis@StatisticalEngineering.com phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jul 11 03:58:00 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 11 Jul 2006 - 06:16:17 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.