Forums > MaxMSP

detect when user closes subpatch window

February 5, 2011 | 8:37 pm

I’d like to find out when a user closes a subpatch window so that I can turn off a few gui features to improve overall performance.

Thanks much!

February 5, 2011 | 9:36 pm

basically [closebang], and in your case probably with a [send].

February 6, 2011 | 1:51 am

Thanks Roman, that worked to detect the window close, but loadbang does not work to detect opening because all of the subpatch loadbangs happen when the parent is loaded. I created a button that opens the subpatch window using [pcontrol], and set the "MySubpatchIsOpen"flag too. I hide the subpatch so that the user can’t double-click to open, thereby bypassing the setting of the flag.

February 6, 2011 | 11:06 pm


[active] is great! I had never discovered it. Thanks so much for the info.


February 7, 2011 | 6:49 am

be warned [active] can be very tricky during programming. whenever you
change something releated to it, you have to restart the patcher.

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

Forums > MaxMSP