Changing the size of a bpatcher window once loaded

Lee's icon

Hi, I'm trying to change the size of a bpatchers presentation rect through hs, but once the patcher is loaded (either dynamically or not), it seems the 'presentation_rect' call on the object becomes unavailable as the object changes from a bpatcher to a patcher... e.g.

var obj = this.patcher.newdefault( 0, 0, "bpatcher" );

obj.presentation( 1 );
obj.presentation_rect( 100, 100, 200, 200 );
obj.name( 'UIMatrix' );

This works as expected and sets the presentation rect as required. However, after the exection of the obj.name() call to load the patcher, no more calls can be made to obj.presentation_rect() as it is no longer a valid call....

Anyone any idea? thx Lee

Lee's icon

HI, anyone any ideas? thx

ch's icon

something like that should work :

this.patcher.message("script", “sendbox”, UIMatrix, “presentation_rect”, 100, 100, 200, 200);

Lee's icon

brilliant, thankyou :)

to_the_sun's icon

Can this be done with ordinary objects, not js?

to_the_sun's icon