jverzani / gWidgets2

Rewrite of gWidgets
35 stars 9 forks source link

Error in UseMethod("addRightclickPopupMenu") : no applicable method for 'addRightclickPopupMenu' #78

Closed landroni closed 10 years ago

landroni commented 10 years ago

I could swear that this was working as expected this morning.. I installed latest GIT and I've been slapped with the following:

require(gWidgets2)
w <- gwindow()
f <- gframe("", cont=w)
l <- glabel("label")                    # no cont argument
addRightclickPopupMenu(l, list(a=gaction("Hi"))) 
f$block$setLabelWidget(l$block)         # the voodoo
l$widget$setSelectable(FALSE)           # may not be needed

Will result in error:

> addRightclickPopupMenu(l, list(a=gaction("Hi"))) 
Error in UseMethod("addRightclickPopupMenu") : 
    no applicable method for 'addRightclickPopupMenu' applied to an object of class "c('GLabel', 'GWidget', 'GComponentObservable', 'GComponent', 'BasicToolkitInterface', 'Observable', 'envRefClass', '.environment', 'refClass', 'environment', 'refObject')"

The same code was working just fine before. Do you see this?

BTW, addPopupMenu(l, list(a=gaction("Hi"))) works fine.

jverzani commented 10 years ago

Sorry. I think this is fixed now.