[PD] before quitting

IOhannes m zmoelnig zmoelnig at iem.at
Wed Dec 18 09:43:09 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2013-12-18 12:22, puredata at 11h11.com wrote:
> Is there a way to do something (let's say close a file, kill a 
> subprocess etc...) before quitting pd (meaning Ctrl+Q or File -
> Quit)?

there is [closebang], which will send out a bang before a patch is
"closed" (Ctrl-W). if you are familiar to writing externals, it's an
equivalent of the "free"-method.
unfortunately [closebang] cannot be implemented as a pure external (as
it requires some changes to Pd's core infrastructure), and it has never
been included with Pd-vanilla. there is a patch pending at sourceforge
[1]. afaik [closebang] and it's cousin [initbang] are included in
Pd-extended.

but this is only half of the truth...when *quitting* Pd (instead of
closing a single top-level-patch, or deleting an object), for some
obscure reasons Pd does *not* call the free-methods of it's objects,
so (afair) [closebang] doesn't work either.

luckily, there is a fix for this [2], so [closebang] might work.
unfortunately, this has never been included in Pd-vanilla. afaik it has
been included in Pd-extended.

admsr
IOhannes


[1] https://sourceforge.net/p/pure-data/patches/93/
[2] https://sourceforge.net/p/pure-data/patches/82/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBCAAGBQJSsWAdAAoJELZQGcR/ejb4ntoP/Art3aZMzkzi49mmUGst40j+
Klv0dRa7DY7nPyFXzol8gw8AABOLIpLnSugcS7F2D0E/ePOKraCOsDM++YaPxLGd
fTRFDvHEOciO1zYu3a6Azbj6E9HB6u5mw1YI9C9wx1f38XHPXwDvne68H5bhFARM
ymydJCSzf6sR65t7z6wmMa17wT0LHDpR1v9YVmfhAWUqRpygv94G9vyzbRvdeK9Q
oCgB6LBX5Vp4lX4eawweF1TnMG/V1V5Rscm9KiCaTdVddC0ACmFsJLIClw0/nyXV
KOVa68wb3E76tLzMEnsgJ3FklZZQHrkv3Tb41IwVhP9x56qV/FG0Ey/MZj42XDgC
6/Rk5kgaZJrEPs/MhHGU2ipqz2w0JYfBB6tYM+OllvqbiQir4KC5XBaDyn2PStBA
nxnxH2JfKx12QJXA0dTraJSf0qpAYj9lauAUGqzG37qjIwOgoo4I+8uwRenGa+Fv
iJPN9pi0t110jjNWZH+7QyzwsZpIz65aqpjRouT+BsyMfosEHzG2NtsfKway/8SX
BDyQ0T3QoHgUppjOjJbKOW5M393maj9NBVzbqljieWWjkwVOVKJ3qgAsQm5syaXV
qNaRyPneylr+/G3bbJX7dpnPmyIZREZl9/xauhXlZbhbf9sXVle2jycnrhbUuQ2U
1tlsZLft8LL0LfLpMNwe
=hUno
-----END PGP SIGNATURE-----



More information about the Pd-list mailing list