[PD] Closing patches via pd message
Martin Peach
martinrp at vax2.concordia.ca
Wed Sep 14 22:52:40 CEST 2005
Miller Puckette wrote:
>Well, there are two problems... first, in a performance you'd sure like
>some way to avoid closing patches by accident, even if they're clean.
>
>
If this happens by accidentally hitting the close box or ctrl-w, perhaps
a configurable way of enabling/disabling the close box and ctrl-w.
In pd.tk you have this to intercept the close box:
wm protocol $name WM_DELETE_WINDOW [concat menu_close $name]
and this to intercept Ctrl-W:
if {$key == "w" || $key == "W"} {menu_close $topname}
..so probably both these bindings could be made conditional on some
user-settable flag.
>Second, it's possible to make a long audio recording into an array (for
>example) without making the patch know it's "dirty".
>
>
>
I notice there is a gl_dirty 'dirty' flag that gets tested in
canvas_menuclose (at least in pd 038), I would guess that it could be
set whenever _anything_ important has changed in the patch...
>I think the proper default behavior is the most careful one (the way it is
>now),
>
I think asking if you want to save a help patch is both annoying and
dangerous, since you might have accidentally changed the help patch
which is usually not what you want
Help patches should probably be read-only.
>but am not sure how to allow or encourage the user to override this,
>whether it should be selectively for individual patches, or as a global
>override, or even some combination of both.
>
>
Possibly a checkbox on the main pd window near the 'compute audio'
checkbox that would globally enable/disable the warning dialogs.
Martin
More information about the Pd-list
mailing list