In The following code, the table handler is executed twice when the button is pressed (from the 2nd pressing on). I want it to be executed only once. Does someone know, why this happens and how I can change it?

library(gWidgets)

w <- gwindow()
b <- gbutton("press", cont=w)
tbl <- gtable(1:10, cont=w)

addhandlerclicked(b, handler=function(h, ...){
        cat("addhandlerclicked button\n")
        svalue(tbl, index=T) <- 1                            # change the table 
value
})
addhandlerclicked(tbl, handler=function(h, ...){
        cat("addhandlerclicked table\n")
})

Thanks!
Mark

–––––––––––––––––––––––––––––––––––––––
Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Vorstraße 93 B01
28359 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to