jverzani / gWidgets2

Rewrite of gWidgets
35 stars 9 forks source link

Pressing ENTER doesn't trigger GEdit handler #85

Closed davidcsterratt closed 9 years ago

davidcsterratt commented 9 years ago

Hopefully this example makes clear what I mean:

## Expect text to appear in console when ENTER pressed in GEdit box
## library(gWidgets)                       # Works
library(gWidgets2)                      # Doesn't work
options(guiToolkit="RGtk2")

h <- function(h, ...) {
  print("Should appear when ENTER pressed")
}

g.win <- gwindow("Test gedit()")
gedit("0", handler=h, width=5, coerce.with=as.numeric,
      container=g.win)
jverzani commented 9 years ago

Ouch, I changed the code in that function and forgot to add back the default handler bit. Fix is now on github by installing the latest gWidgets2RGtk2. In the meantime, addHandlerChanged will work as a workaround.

Thanks