From: Albert Schlef Date: 2009-02-04T22:40:16+09:00 Subject: Re: A Tk window Phlip wrote: [...] > Now here's a blast from the past: [...] > Tk.mainloop() > Tk.restart() Superb! That solved my problem. Thanks. (BTW, suppose I'll be running my code inside a Tk application. In that case I wouldn't want to execute Tk.mainloop() (and restart(), of course) at all. Any way to find out if we're already running in a Tk application?) > > Notice I was using 4-space indentations [...] LOL Hidetoshi NAGAI wrote: > There is a trick ;-) [...] > @v.wait # wait command makes a eventloop while waiting Thanks, Nagai, but this is too much voodoo for me :-) I don't bother to study the "dark" corners of Tk because I have a feeling Tk is a dead-end. (It has an ingeniously simple API, I admit, but the facts that I struggled yesterday to fetch the selcted item from a TkListbox, and even more to add scrollbars, and that the fonts are so ugly and unreadable, show that Tk has been dormant for at least 15 years.) But it seems we don't have much choice. GTK requires you to memorize CONSTANTS. Shoes doesn't have mature widgets. FOX is a pain to compile. So we go with Tk. -- Posted via http://www.ruby-forum.com/.