Subject [PD] Close this window?

Mathieu Bouchard matju at artengine.ca
Thu Apr 13 01:41:28 CEST 2006


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

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada




More information about the Pd-list mailing list