js bpatcher failure

audiovisualist's icon

i create several bpatcher with this line of code. (setups.... vsize are variables for the position and size)
tp.newdefault(SetupX,SetupY,"bpatcher","@patching_rect",SetupX,SetupY, hsize, vsize, "@presentation", 1, "@presentation_rect", SetupX,SetupY, hsize, vsize)

it creates my bpatcher correctly, but i ve got the error message "bpatcher: error loading patcher @presentation" in max window. i didn't find the failure. because the object is created and works fine.

timtation's icon

if i'm not wrong, you could do this with some more lines:

mybpatch = tp.newdefault(SetupX,SetupY,"bpatcher");
mybpatch.patching_rect = [SetupX,SetupY,hsize,vsize];
mybpatch.presentation = 1;
mybpatch.presentation_rect = [SetupX,SetupY,hsize,vsize];