Parent unlocked

Dec 3, 2011 at 9:53am

Parent unlocked

Is there way to find out if the parent patcher is locked or unlocked?

I have a lot of bpatchers which adapt to their size. I could poll the size while a patcher is unlocked, to adapt automatically whenever the size of the bpatcher is changed. Of course this would eat a lot of unnecessary CPU cycles when the patcher is in normal use…

Stefan

#60433
Dec 3, 2011 at 11:02am

i reckon it’s no problem with js. somehow with the “parentpatcher” and “locked” properties. someone else needs to help here.
O.

from inside the parentpatcher it’s easy.

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

#217503
Dec 3, 2011 at 12:50pm

function bang() {
if (this.patcher.parentpatcher) {
outlet(0,this.patcher.parentpatcher.locked);
}
}

#217504
Dec 3, 2011 at 3:00pm

Hello,

I do not know for [bpatcher] but for [patcher] i did an external [quebec] you can find in my “tralala” toolbox to deal with lock/size states ….

HTH

#217505

You must be logged in to reply to this topic.