Forums > MaxMSP

dispose message with thispatcher in subpatch deletes it in master patch


Feb 02 2010 | 1:45 am

I use "front" and "dispose" messages to make a subpatch appear on screen. "front" works well. "Dispose" does close the subpatch, but the subpatch object in the master patch also disappear. Is that a normal behavior ?

Feb 02 2010 | 2:15 am

If you’re opening [patcher]s or abstractions from within your main patch then try [pcontrol].

lh

Feb 02 2010 | 10:35 am

dispose will effectively kill your patcher. You can either use pcontrol object as suggested by Luke, or use the wclose message to thispatcher.

Feb 03 2010 | 7:40 pm

wclose, that’s what I wanted to know. Thanks guys!

I didn’t find the list of these messages in the thispatcher reference patch, although there is a complete list of "script" messages. Did I miss something in the reference pages ?

Feb 04 2010 | 11:56 am

Well well, I’m happy you complain. I’m afraid you didn’t miss anything…

I already wrote about this documentation problems several times on this forum, but without any result so far. Let’s hope someone is now listening ;-)

p

Feb 05 2010 | 9:06 pm

I’ve run into this problem too.

The help file for thispatcher specifies ‘dispose’ to close the patcher window. No mention of ‘wclose’ in either the help or the reference. Not only does a ‘dispose’ message delete the subpatch object, an undo won’t bring the subpatch back (presumably because it was deleted via the message).

So if you haven’t saved your master patch before you unwisely sent the (recommended) ‘dispose’ message to your carefully crafted subpatch, you’ve just lost everything. And you can’t get it back.

This is not trivial – it’s exactly the kind of thing that scares people away from Max. And you can find complaints about this particular problem dating back 2 years. I can’t think of any excuse for why this hasn’t been fixed.

Feb 07 2010 | 9:25 am

+1

"wclose" should be on the main help page, and "dispose" could also be there, but not connected for safety (like "kill" for jit.qt.movie)… and there should be a bright red warning label for it!

Feb 07 2010 | 3:01 pm

I’ll add the proper stuff to the refpage.

Feb 07 2010 | 5:42 pm

On a similar/related note:

What’s the object called for checking if a patcher is the frontmost? It’s an undocumented object so I can’t find it. Does it still exist in Max5?

Thanks.

Feb 07 2010 | 6:27 pm

That would be [active].

lh

Feb 07 2010 | 8:46 pm

Sure isn’t undocumented. Refpage and help file….

Feb 08 2010 | 12:46 pm

This could be the corrected help file. The dispose message is good for the reference but bad for the help file. People tend to copy from help files which should be encouraged on all levels, the dangerous parts don’t need to be there…


-- Pasted Max Patch, click to expand. --

Feb 08 2010 | 2:32 pm

@Luke Hall

Thanks! That’s two problems you’ve helped me with in as many posts.

@Gregory Taylor

My bad, yeah it is documented. I must be confusing it with something else. Thanks for putting me in my place on that one. ;)

Viewing 13 posts - 1 through 13 (of 13 total)

Forums > MaxMSP