[javascript-dev] Re: Storing Maxobj in an Array
David Rowland
david.rowland at uwe.ac.uk
Tue Mar 25 18:16:31 MDT 2008
- Previous message: [javascript-dev] Re: Storing Maxobj in an Array
- Next message: [javascript-dev] js question from a newbie
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks for your reply it helped a lot. I knew the array index would mess me up (its been over a year since I have done any programming and that was in C).
I have decided to use the array index as the OSC name suffix to make things simpler.
Here is the code I am using at the moment.
case "OSC Unit":
if(newObj = patcher.newobject("bpatcher", 300, 100, 300, 100, -220, -30, "OSC Unit.pat", 0))
{
noOSCUnits = OSCUnit.push(newObj);
OSCUnit[noOSCUnits-1].varname = "OSC" + (noOSCUnits-1); post("
The total number of OSC Units is: ",noOSCUnits);
post("
The most recent OSC Unit is: ",OSCUnit[noOSCUnits-1].varname);
}
else
{
post("No OSC Unit returned");
}
break;
Cheers.
- Previous message: [javascript-dev] Re: Storing Maxobj in an Array
- Next message: [javascript-dev] js question from a newbie
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
