floating bptacher windows in a parent patch

Luca Schwarz's icon

Hi,

I'm trying to float the editor window of a bpatcher on load, but the wrong window ends up being floated.

My setup: I have a top-level patch that hosts several bpatchers, which I open as tabs. Some of these bpatchers have their own editor windows that open additionally when I click into them. I want those individual bpatcher editor windows to float (always on top), not the top-level host patch.

I've set up the following in the bpatcher content patch:


The ordering and timing seem correct, but thispatcher appears to be referencing the top-level host patch rather than the bpatcher's own editor window — so the host patch gets floated instead.

Is there a way to target the bpatcher's own window specifically? I've seen mentions of this working with window exec and front messages but can't get it to apply to the right context.

Thanks!

Wil's icon

Here some code I use .

Adapted from @sourceaudio

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

(probably your loadbang needs to be outside of [b patcher])


Luca Schwarz's icon

yes this works but not for the case i described. when working with tabs (so everybpatcher opens as a tab in the parent patch) i want to be able to float the bpatchers windows additionally to having the possibility to have them opened as tabs.

Source Audio's icon

principle is absolutely the same.

no matter if you use tabs, bpatchers or sub patchers,

using proper messages to thispatcher,

you can float any patcher.

Luca Schwarz's icon

thats great to know, still it works fine without tabs but with tabs only the parent patch will float, not the tabbed ones, even if the parent patcher wont have a thispatcher float arg in it. i would deeply apreciate the help (patch????) <3

Roman Thilenius's icon

i cant try this now (andi am not really using max 9) but it can be that with bpatcher you can run into threading trouble, i.e. it might not be enough to send "open" directly followed by the thispatcher commands, but ra ther that is requires a pause.

note that alternatively to the verbose and dynamic loadbang -> thispatcher method you can also assign the attribute "floating" to the patcher file in its patcher inspector to make it permanently open like that.

Luca Schwarz's icon

hi roman! yeah that would be obvious but no floating attribute for me (max 9)


Source Audio's icon

here is patch with 2 floating windows on load

tab-stuff.maxpat
Max Patch


Luca Schwarz's icon

thx mate! gonna study this :)

Luca Schwarz's icon

source audio would it be possible to let sub1 float? it doesnt in your example right? because that would be exactly what i want to achieve. thx again!

Source Audio's icon

sub1 is placed in root of parent patcher.

You asked to open floating subpatcher window (editor window)

of a bpatcher .

Not to open bpatcher itself floating,

which does not work

here is same thing as previous patch, but with

embedded bpatcher which has subpatch that can float.

just as you described.

tab-stuff-2.maxpat
Max Patch


Luca Schwarz's icon

Thx mate !!! :)))