Forums > Javascript

What is scripting name/var name for?

Dec 30 2013 | 1:56 am

Can anyone explain to me how I should/can use the "scripting name" attribute in javascript?
In the inspector I can see it is the same thing as the "varname" property, but I am not sure exactly what this helps me do.

It seems like this could somehow be used to access the various objects in the patcher but I have tried var x=this.patcher.getnamed("setvarname");
function bang(){

And that-and any variations, do not work. Thanks for any input.

Dec 30 2013 | 2:56 am

Hi !
varname is a scripting name for your JS api , so you can find it inside your patcher easily through JS
for example this way :

var myObject = this.patcher.getnamed("yourScriptingName"); // lets say numbox has varname of "yourScriptingName"

function bang(){
Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Javascript