From: "H.Yamamoto" Date: 2005-04-28T03:11:54+09:00 Subject: Re: tk_optionMenu bug in 1.8.2 >I have attached a standalone file which does this. > >Just run it and push any of the three add buttons to reproduce the >error. Sorry it isn't smaller -- if this isn't good enough I can >attempt to gut pieces of it at a time to see how small I can get it. I couldn't reproduce the same error, but another error occured. 1. click any of the two add buttons on the left side 2. click Cancel button in opened window 3. following error is reported RuntimeError: window ".w00087" was deleted before its visibility changed ---< backtrace of Ruby side >----- E:/ruby-cvs/win32/.ext/tk.rb:2020:in `_invoke' E:/ruby-cvs/win32/.ext/tk.rb:2020:in `_invoke' E:/ruby-cvs/win32/.ext/tk.rb:3928:in `wait_visibility' /pgui_orig.rb:194:in `make_add_button' /pgui_orig.rb:94:in `call' E:/ruby-cvs/win32/.ext/tk.rb:1104:in `eval_cmd' E:/ruby-cvs/win32/.ext/tk.rb:1104:in `cb_eval' E:/ruby-cvs/win32/.ext/tk.rb:1055:in `call' E:/ruby-cvs/win32/.ext/tk.rb:1198:in `callback' E:/ruby-cvs/win32/.ext/tk.rb:1197:in `catch' E:/ruby-cvs/win32/.ext/tk.rb:1197:in `callback' E:/ruby-cvs/win32/.ext/tk.rb:1418:in `mainloop' E:/ruby-cvs/win32/.ext/tk.rb:1418:in `mainloop' /pgui_orig.rb:367:in `initialize' /pgui_orig.rb:662:in `new' /pgui_orig.rb:662 ---< backtrace of Tk side >------- invoked from within "rb_out c00010" invoked from within ".w00002.w00029.w00031.w00037 invoke" ("uplevel" body line 1) invoked from within "uplevel #0 [list $w invoke]" (procedure "tk::ButtonUp" line 24) invoked from within "tk::ButtonUp .w00002.w00029.w00031.w00037" (command bound to event) This error seems to happen because win.wait_visibility wait for visibility changing to `false'. (not true as intended) I think this is because window is already visible when this method is invoked. This problem is solved by following patch. Does this patch change your situation too? --- E:\pgui_orig.rb Thu Apr 28 02:51:48 2005 +++ E:\pgui.rb Thu Apr 28 02:52:15 2005 @@ -191,7 +191,7 @@ module ACTMfg ok.pack('side' => 'left') cancel.pack('side' => 'left') - win.wait_visibility +# win.wait_visibility win.focus end end @@ -245,7 +245,7 @@ module ACTMfg end TkGrid.configure(pkg_label, operator_label, ver_label) TkGrid.configure(pkg_entry, operator, ver_entry, ok, cancel) - win.wait_visibility +# win.wait_visibility win.focus end end ////////////////////////////////////////// If not, and if this error is reported with an error dialog, >bgerror failed to handle background error. > Original error: NameError: invalid command name `tk_optionMenu' > Error in bgerror: invalid command name "bgerror" please click "Details" button on the right side. More detailed backtrace must be there.