From: "Glenn M. Lewis" Date: 2005-10-21T12:07:00+09:00 Subject: Ruby/Tk question Hi all! I have an application that pops up a window until someone closes it, and then pops up another one until someone closes it. But if I try to open a window the second time, this is what happens (using Ruby 1.8.2, WinXP Pro SP2, one-click installer): C:\tmp>irb irb(main):001:0> require 'tk' => true irb(main):002:0> t = TkRoot.new() { title "yo yo ma" } => # irb(main):003:0> text = TkText.new(t) => # irb(main):004:0> Tk::mainloop => true # # Here, the window has popped up, and I click on the close button in the upper right... # irb(main):005:0> t = TkRoot.new() { title "yo yo ma" } RuntimeError: can't invoke "wm" command: application has been destroyed from c:/ruby/lib/ruby/1.8/tk.rb:1948:in `__invoke' from c:/ruby/lib/ruby/1.8/tk.rb:1948:in `_invoke' from c:/ruby/lib/ruby/1.8/tk.rb:1498:in `_ip_invoke_core' from c:/ruby/lib/ruby/1.8/tk.rb:1532:in `_tk_call_core' from c:/ruby/lib/ruby/1.8/tk.rb:1556:in `tk_call' from c:/ruby/lib/ruby/1.8/tk/wm.rb:271:in `title' from (irb):5 from (irb):5:in `instance_eval' from c:/ruby/lib/ruby/1.8/tk/root.rb:48:in `instance_eval' from c:/ruby/lib/ruby/1.8/tk/root.rb:48:in `new' from (irb):5 irb(main):006:0> Obviously, I'm doing something silly. Can anyone tell me what that is? Thanks! -- Glenn