Forums > MaxMSP

Getting bpatcher embed state from js


Lee
April 30, 2013 | 9:29 am

Hi, given the following 2 calls:

post( "name: " + this.patcher.getattr( ‘name’ ) + ‘n’ );
post( "embed: " + this.patcher.getattr( ‘embed’ ) + ‘n’ );

the first one correctly returns the filename of the bpatcher as expected, but the 2nd one always returns null rather than the state of the embed flag? Is there another way to get this value or is this a bug?

thx Lee


April 30, 2013 | 9:32 am

I believe that ‘embed’ is an attribute of the parent box of the bpatcher, not of the patcher itself.

Hope that helps, Jeremy



Lee
April 30, 2013 | 9:52 am

Hi, cheers Jeremy…

I’ve tried

post( "name: " + this.patcher.box.getattr( ‘name’ ) + ‘n’ );
post( "name: " + this.patcher.box.patcher.getattr( ‘name’ ) + ‘n’ );

Still both null…


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