Сессия R прервана после закрытия приложения tcltk - PullRequest
0 голосов
/ 10 апреля 2019

Соединение с моим приложением R tcltk не закрывается, когда я закрываю приложение.Сессия R прерывается, когда я нажимаю кнопку «Закрыть сессию».Любая помощь приветствуется.Спасибо!

library(tcltk)
library(methods)

tt <- tktoplevel()
tkwm.title(tt, "First window")

done <- tclVar(0) # done = 0 if window is active; done = 1 if window has been closed, done = 2 if window has been closed using cancel or destroyed

# build quit button ----
quitButton <- tkbutton(tt, text = "Close Session",
                       command = function() {
                         quit(save = "no")
                         tkdestroy(tt)
                       }
)

# construct visual grid ----
tkgrid(quitButton,
       pady= 2.5, padx= 1)


tkwait.variable(done)
...