thispatcher in bpatcher does not report window size any more in max7

klaus filip's icon
Max Patch
Copy patch and select New From Clipboard in Max.

hi there,
here is a simple bpatcher file to demonstrate, that thispatcher refuses to answer on the "window getsize" message,
when sitting inside a bpatcher. (which it perfectly did in max6)
please tell me, if this is a bug or a wanted new behaviour.
thanks
klaus

klaus filip's icon

with 6 lines of javascript i am saved though ;)

var w;
function get()
{
w=this.patcher.wind;
    outlet(0,w.location[2]-w.location[0],w.location[3]-w.location[1]);
}

Music_SDP's icon

Klaus, thank you so much for this code! I noticed that, while it works, it doesn't output quite the same information that the original getsize message generates. I made some modifications so that you now get the exact same dimensions that you'd get from thispatcher

Music_SDP's icon

var w;
function get()
{
w=this.patcher.wind;
outlet(0,w.location[0],w.location[1], w.location[2], w.location[3]);
}

Music_SDP's icon

ok, upon further testing, it looks like it's reporting the window size of the parent patch, not the actual bpatcher file itself

11OLSEN's icon

What about this?

function bang() {
outlet(0, this.patcher.box.rect);}

OCH's icon

Thank you 11olsen :)