[R] another tcl/tk query

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Sat Jul 8 19:11:25 CEST 2006


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
 



More information about the R-help mailing list