[R-gui] svalue(gtable)

jverzani jverzani at gmail.com
Thu Jun 26 04:43:51 CEST 2008


NOEL Yvonnick <yvonnick.noel <at> free.fr> writes:

> 
> Hello,
...
> I can reproduce the error by using the first example in the gtable help 
> file:
> 
> m <- getCRANmirrors()[,c(1,4)]
> setCRAN <- function(URL) { ## see chooseCRANmirror
>    repos = getOption("repos")
>    repos["CRAN"] <- gsub("/$", "", URL)
>    options(repos=repos)
> }
> w <- gwindow("gtable example",width=400)
> gp = ggroup(horizontal=FALSE, cont=w)
> tab <- gtable(m, chosencol = 2, cont=gp, expand=TRUE,
>      handler = function(h,...) setCRAN(svalue(h$obj)))
> bg <- ggroup(cont=gp)
> addSpring(bg)
> gbutton("dismiss", cont=bg, handler = function(h,...) dispose(w))
y> 
> Then, selecting one of the elements, and trying to get access to the 
> gtable value, I get:
> 
>  > svalue(tab)
> Error in function (classes, fdef, mtable)  :
>    unable to find an inherited method for function ".svalue", for 
> signature "gGridRGtk", "guiWidgetsToolkitRGtk2", "NULL", "NULL"
> 
> Is this a problem related to the recent redefinition of the svalue 
> method as generic?
> 
> Thanks a lot,
> 
> Yvonnick Noel, PhD
> University of Brittany at Rennes, France
> 

Hi,

I don't see this problem with my version of RGtk2. Can you email me offline with
your version of gWidgets, gWidgetsRgtk2 and R so I can check?I did make a minor
change to .svalue as there was a mistake in the signature. It may have
introduced the error you see.

--John



More information about the R-SIG-GUI mailing list