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 at intermountainmail.org
(801) 408-8111
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at
stat.math.ethz.ch] On Behalf Of Charles Annis, P.E.
Sent: Saturday, July 08, 2006 11:11 AM
To: r-help at 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 at StatisticalEngineering.com
phone: 561-352-9699
eFax:? 614-455-3265
http://www.StatisticalEngineering.com
?
______________________________________________
R-help at 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