Page 1 of 1

referencing user variables

Posted: 29 Apr 2016 16:27
by dbudde
If I create a user variable in an object, I can refer to it in a script as objectName.variableName. This works as one would expected.

However, if I use findobject('objectName').variableName, this gets a syntax error. setexpression(findobject('objectName'), ‘variableName’, value) works. So why doesn’t the dot operator work after findobject('objectName')?

Re: referencing user variables

Posted: 02 May 2016 18:43
by schoko
Hi,


thats not c++ (as fas as i can remember)....
when you make a setexpression (light of a pad for example)
you can getexpression(findobject('..'),'light')

you have a PAD1 (Pad) where you make a script called "number" you can getexpression that number like written above.
Everything under the grey cubes (means this is an object), can be "getexpressioned" except sripts.
I highly suggest you to organize lists under a DataContainer, for easy access and reference.

cheers
schoko