Close button for patcher (not the x button)

KatKaDe's icon

Hi,

I'trying to close a patcher with a message or a button that is not the X button. The application that I made in MaxMsp Jitter is going to be used by non maxovians so they wouldn't know how to manage. Just like on the web, there is a message that leads to the main patch.

thanks

Close button for patcher (not the x button)

pyrolator's icon

You could design a "close-button" by yourself and use the thispatcher-object.

bkshepard's icon

Is the patcher window you want them to close part of a larger patcher? If so, you can do something like this.

Max Patch
Copy patch and select New From Clipboard in Max.

Luke Hall's icon

The "dispose" message to [thispatcher] is probably what you're after.

lh

Floating Point's icon

instead of the (dispose) message to [thispatcher], I'd suggest you use the undocumented, but more benign (wclose) message.

or you could use this javascript:

var p=this.patcher;
function msg_int(v)
{
if (v==0)
p.wind.visible = 0;
else if (v=1)
p.wind.visible = 1;
}

Put the js referent object in a patcher tht you want to hide (or un-hide), and send it a 1 or 0.
T

KatKaDe's icon

I do not know JAVA ((

and for the (wclose) message I will try it tomorrow ( it is now 1130pm where I am) and I will let you know

thank you

seejayjames's icon

java != javascript

and you don't need to know it, it's provided! read through it and it'll make sense.

as said, you can use one of a couple messages to [thispatcher], or [pcontrol] if it's a subpatch/abstraction in the main patch. Just have a button that sends "close" out an outlet, and hook that up to [pcontrol] outside the patch. I use these in most subpatches (plus a float/non-float button) while I'm building things, it saves tons of time.

pdelges's icon

Terry McDermott wrote on Sat, 14 November 2009 23:05instead of the (dispose) message to [thispatcher], I'd suggest you use the undocumented, but more benign (wclose) message

It was documented in Max4. This is another example of problems with Max5's documentation. I wrote about this one (not about wclose, but about [thispatcher]) on the forum in july 2008, but only received a strange response from Jeremy Bernstein.

Max5.1ß's documentation didn't improve this.