[PD] reload a patch
Chris McCormick
chris at mccormick.cx
Wed Aug 30 06:04:31 CEST 2006
On Tue, Aug 29, 2006 at 10:54:55PM -0400, Mathieu Bouchard wrote:
> On Wed, 30 Aug 2006, Max Neupert wrote:
>
> >now it does. all-though it crashes my pd completely if i try to close
> >while there are more than one with the same name opened. this is
> >probably not a feature.
>
> When a canvas closes, it removes itself from the receivers list using
> pd_unbind. When the number of receivers goes from 2 to 1, pd_unbind
> deletes the [bindlist] object. At this point, [bindlist]'s method has not
> finished running, which is what causes the crash.
Yikes!
I am not sure if this would suffer the same problem, but what I do for
this kind of dynamic opening and closing of patches is have a bunch of
subpatches in my main patch called:
[pd inst1]
[pd inst2]
[pd inst3] etc.
Then I send internal messages to them to add objects called the patch I
want to dynamically open. When it's time to delete those patches, I
issue a [clear( to the subpatch which closes and deletes the instance of
the dynamically open patch. I am pretty sure I have had multiple
versions of the same patch open in this way before.
Maybe you can use this method Max? If you'd like an example I can send
one through.
Best rgds,
Chris.
-------------------
chris at mccormick.cx
http://mccormick.cx
More information about the Pd-list
mailing list