Forums > Javascript

Changing the size of a bpatcher window once loaded



Lee
May 15 2013 | 3:00 pm

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
May 16 2013 | 11:30 am

HI, anyone any ideas? thx


ch
May 17 2013 | 1:54 am

something like that should work :

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


Lee
May 18 2013 | 5:14 am

brilliant, thankyou :)

Aug 25 2014 | 4:24 pm

Can this be done with ordinary objects, not js?

Aug 25 2014 | 4:32 pm
Viewing 6 posts - 1 through 6 (of 6 total)

Forums > Javascript