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
Alberto Monteiro <albmont <at> centroin.com.br> writes:> 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. >Works for me with R-2.4.1 on Windows 2000. So better tell us about the details of your operating system. Dieter