references to maxobj objects.

Nov 14, 2006 at 1:21am

references to maxobj objects.

I am trying to create a subpatcher, and fill it with 5 ctlouts. I am having trouble referring to the object that I created, and then with getting the maxobj to recognize the subpatcher method. Any suggestions?
———————————
var elementArray = new Array ();

function createControlTower()
{
var controlTower = this.patcher.newdefault(300, 100, ‘patcher’, ‘controlTower’);
controlTower.varname = ‘thesubpatch’;
}

function fillControlTower()
{
var homename = patcher.getnamed(‘thesubpatch’);
var homebase = homename.subpatcher();
for (i = 0; i < 5; i++)
{
elementArray[i] = homebase.newdefault(20*i, 20, “ctlout”);
}
}
———————————
Myer

#28686
Nov 14, 2006 at 1:27am

Ha! After messing around with this for two hours, it just started to work, somehow … now if only I could figure out why, so that I don’t do it again!

#88387

You must be logged in to reply to this topic.