From: "Glenn M. Lewis" Date: 2005-10-23T09:22:00+09:00 Subject: Re: Ruby/Tk question Yes indeed... you are exactly right. Thank you! I found Tk.restart, and tried it out, and it worked for the most part, but when the window was rebuilt, the scrollbars no longer worked. Do you know of another workaround? Thanks again! -- Glenn Hidetoshi NAGAI wrote: > From: "Glenn M. Lewis" > Subject: Ruby/Tk question > Date: Fri, 21 Oct 2005 12:07:00 +0900 > Message-ID: > >>irb(main):004:0> Tk::mainloop >>=> true > > > You closed the root window here, didn't you?. > When the root window is destroyed, the Tk interpreter looses > all Tk functions. So, you got the following error. > > >>irb(main):005:0> t = TkRoot.new() { title "yo yo ma" } >>RuntimeError: can't invoke "wm" command: application has been destroyed > > > If you want to create widgets again, you have to re-initialize > the Tk interpreter. > Please try 'Tk.restart'. > Although it possibly works, I don't recommned it because I cannot > assure you that it can completely reset the interpreter. > > # If you want to hide the window, 'TkRoot#withdraw' is better.