Hi,
a suggestion that probably was already spoken of here: some patches have a
have a steady core, but a dynamic behavior. A simple example is attached
of a patch whose goal is only for graphical display. But other patches
might have a more complex behavior, and depend on on-the-fly parameters.
For example, a patch with a graphical eq that changes the number of bands
dynamically, and automatically displays them graphically.
That to say, these patches are already "complete" when the basic code is
given - this code than lets the patch reformulate itself to other
configurations. If you agreed with what I said so far, you should agree
that it is weird that when closing these patches, they're marked as
"dirty", and pd asks for them to be saved. I guess it would make sense to
add a "pd make clean" command or something that restrains pd from asking
the patch to be saved.
The patch I send gets dirty every time it is initiated due to the
donecanvasdialog message. Which means that if you're using this kind of
button 20x in your patch, you'll get 20 "save changes" messages. People
can argue that it's possible to close the main patch with ctrl-shift, but
that's itself a dirty solution - and sometimes makes pd crash, at least in
windows.
I suggest a "pd make clean" message, but maybe someone has a better idea.
Best,
João
Note: sooner or later, this patch will be in the jmmmp library.