Hi,
I have made a minimal example of my problem:

require(tcltk)
tt <- tktoplevel();
AUS <- function()
{
        test("hello");
}
AUSButton.but <- tkbutton(tt,text="OK",command=AUS)
tkgrid(AUSButton.but)
tkfocus(tt);

test <- function(parameter) {
        for (i in 1:100) {
                for (j in 1:100000) { j <- j + 1;}
                print(i);
                flush.console();
        }
}


There ist the function test (with a parameter), and this function does a 
time-consuming calculation, but shows the progress with the numbers from 1 to 
100.

When I click the button "OK", the tktoplevel window and R don't response 
anymore and there are no numbers on the console until the  outer for loop   is 
finished. Then there are printed out all numbers at once.

Is there a possibility to change the call of the function test() that R and the 
tktoplevel window don't "crash" and the function test is "normally" executed at 
the console?

Thank you!

Stefan Richter
        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to