[R-gui] Idle/timer callbacks in tk widgets
Stephen Eglen
S.J.Eglen at damtp.cam.ac.uk
Tue Jan 9 00:26:37 CET 2007
Dear `Peter, Michael, list,
Thanks for your responses. I have now tried both suggestions (of
using the "after" command, and Sys.sleep() within a loop). from my
preliminary expts, it seems that both methods do what I want. The
"after" first method also seems to have the advantage of not blocking
the R prompt while the movie is playing.
For the archives (and for others if interested) I'll send my test
script tomorrow to the list.
Best wishes, Stephen
> I admit I am not familiar with the tcltk package, but it sounds to me that
> you want to yield to the GUI event loop and check whether the stop button
> has been pressed. Calling Sys.sleep(1) in the loop will allow the button
> handler to be called. Just have it set some flag that lets you break out of
> the loop.
More information about the R-SIG-GUI
mailing list