Subject [PD] Close this window?

Martin Peach martinrp at vax2.concordia.ca
Thu Apr 13 17:22:27 CEST 2006


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





More information about the Pd-list mailing list