That is an awesome solution!
~Kyle
On 8/29/06, Chris McCormick chris@mccormick.cx wrote:
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@mccormick.cx http://mccormick.cx
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list