From: Daniel Carrera Date: 2003-03-11T13:02:29+09:00 Subject: Re: [Q] How to destroy a TkToplevel window On Tue, Mar 11, 2003 at 12:10:24PM +0900, mgushee@havenrock.com wrote: > Hmm, this is an interesting puzzle. The direct cause of the error > message you're seeing is that the Tk widget ID (".w0005.w0006") is > out of scope at the time the command is invoked. But exactly *why* > it's out of scope is another question, which I can't answer. > > The good news is that I have a solution for you: Actually, just replacing: button_quit.bind("ButtonRelease-1") { dialog.destroy } by button_quit.configure("command" => Proc.new { dialog.destroy } ) Works. I wonder why that is. -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137