Getting bpatcher embed state from js

Apr 30, 2013 at 9:29am

Getting bpatcher embed state from js

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

#68019
Apr 30, 2013 at 9:32am

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

Hope that helps, Jeremy

#244406
Apr 30, 2013 at 9:52am

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…

#244407

You must be logged in to reply to this topic.