Running this: library(tcltk) tt <- tktoplevel() done <- tclVar(0) but <- tkbutton(tt, text="OK", command=function() tclvalue(done) <- 1) tkpack(but) tkwait.variable(done)
works as fine as long as I click the OK. However, if I close the window (by clicking in the X), R enters into an infinite loop and there's no way of returning except by closing the R window. Why? What am I doing wrong? Alberto Monteiro ______________________________________________ R-help@stat.math.ethz.ch 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.