Mathieu Bouchard wrote:
On Wed, 12 Apr 2006, Martin Peach wrote:
wm protocol $name WM_DELETE_WINDOW [concat menu_close $name] ...is supposed to trap the window close box, if I understand it correctly...for some reason it doesn't get the main window.
it's because it's inside "proc pdtk_canvas_new", which is only for canvases. You need to add an extra line in the main program (just outside of any proc {} section) that's like this:
wm protocol . WM_DELETE_WINDOW [concat menu_close .]
except that menu_close isn't designed to work with the "." (main) window so you'll have to figure out something that does... maybe:
wm protocol . WM_DELETE_WINDOW menu_quit
That last one seems to work well. Thanks, Mathieu!
Martin