From: "Glenn M. Lewis" <noSpam / noSpam.com>
Subject: Ruby/Tk question
Date: Fri, 21 Oct 2005 12:07:00 +0900
Message-ID: <sTY5f.1640$Hs.640 / tornado.socal.rr.com>
> 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.
-- 
Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)