[R] gWidgets (tcltk): problem extracting values from widgets in glayout grid
jverzani at gmail.com
Thu Aug 23 05:04:39 CEST 2007
<englund.evan <at> epamail.epa.gov> writes:
> I haven't been able to find an example for the second case below -- or
> perhaps I didn't recognize it when I saw it.
> Is there a value for x such that svalue(x) will return "bbb", either by
> itself or as part of an array? Or do I need to do something else
> (R2.5.1; Windows XP)
You will need to store the widget. See below.
> > ### Case 2: this makes an identical window & widget, with "b"
> replacing "a"
> > ### but does't return the value
> > wtesta = gwindow("wtestb",visible=TRUE)
> > wtestb = glayout(visible=TRUE,container=wtesta)
> > wtestb[1,1]=gedit("bbb",container=wtestb)
> > print(svalue(wtestb[1,1]))
the glayout container doesn't work that way. You don't get a [
method, just a [<- one. Try something like this instead to store the widget:
wtestb[1,1]=(bbb <- gedit("bbb",container=wtestb) )
> Evan Englund
> U.S. EPA
> R-help <at> stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help