GWidgets and a problem with rGtk2 with ggroup

On ubuntu 12.04, I installed gWidgets and intend to use RGtk2 binding. Now, invoking individual components such as

obj <- gbutton("hello man!", container = gwindow()) 

works, but with a different base function

win <- gwindow("main app")
group <- ggroup(container = win)

I get the error that I usually get when something is not installed

Error in add(tag(obj, "contentPane"), value, expand = TRUE, fill = "both") : 
  error in evaluating the argument 'obj' in selecting a method for function 'add': Error     
  in function (classes, fdef, mtable)  : unable to find an inherited method for function   
 ".tag", for signature "<invalid>", "guiWidgetsToolkitRGtk2"

I tried reinstalling both libgtk-dev and R and gWidgets, but nothing worked.

Any ideas?

+3
source share
2 answers

Hmm, the problem seems to be related to the fact that the gwindow object is invalid before it is passed to the container in the group container. I saw that similar problems occur when the toolbox is not specified. To find out if this is the cause, try copying and pasting this code:

library(gWidgets)
options(guiToolkit="RGtk2")

w <- gwindow()
g <- ggroup(cont=w)
l <- glabel("it is working", cont=g)
+1
source

. , , cairoDevice, . , .

+2

All Articles