In fact, the same thing happens (window freezes) when a long computation 
generated by the tcltk window is stopped through the R console.
 
library(tcltk)
library(svMisc)
win<-tktoplevel()
n<-10000
ff<-function(){
         for(i in 1:n){progress(i,n)}
         }
button<-tkbutton(win,text="test",command=ff)
tkpack(button)
 
Francois Rousseu

 

> From: francoisrous...@hotmail.com
> To: r-help@r-project.org
> Date: Sun, 6 Nov 2011 21:55:58 -0500
> Subject: [R] tcltk window freezes when using locator( )
> 
> 
> Hello useRs
> 
> Using the following code:
> 
> library(tcltk)
> win<-tktoplevel()
> ff<-function(){
> plot(1:10,1:10)
> pol<-locator(1)
> print(pol)
> }
> button<-tkbutton(win,text="test",command=ff)
> tkpack(button)
> 
> makes the win panel stop responding when the plot is closed before choosing a 
> location. Usually, the windows task manager 
> has to be used to close the window (which causes R to be stopped as well) or 
> a message saying that R is not responding is 
> displayed. I was having the same problem with R 2.13.0 so I upgraded to 
> 2.14.0 but the problem persists. I am using windows 7.
> 
> > sessionInfo()
> R version 2.14.0 (2011-10-31)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
> locale:
> [1] LC_COLLATE=French_Canada.1252 LC_CTYPE=French_Canada.1252 
> [3] LC_MONETARY=French_Canada.1252 LC_NUMERIC=C 
> [5] LC_TIME=French_Canada.1252 
> attached base packages:
> [1] tcltk stats graphics grDevices utils datasets methods base 
> 
> Am I doing something wrong or more likely is this a bug?
> 
> Thanks,
> Francois Rousseu
> 
> 
> 
> 
> [[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.
                                          
        [[alternative HTML version deleted]]

______________________________________________
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