In the jsui help patch, there’s the 2d vector control example.
One can see lines of code using the onresize.local, onclick.local and ondrag.local variables.
First I do not understand when those lines are executed because they are outside any function (see shortened code below).
Second, what are they for ?
Thank you in advance.
onresize.local = 1; //private
onclick.local = 1; //private
ondrag.local = 1; //private
setting the local property of a function to 1 will make it inacessible from outside the js instance, i.e. from Max patches.
In your example, you cannot send the message onclick(66,666) to the js.
Setting values don’t need to be done within a function, I’m sure you do things like: inlets = 1; in your codes.
inlets = 1;
I discovered your answer after having posted mine !
Sure code can be put outside functions but it’s a bit strange to see it there…
Log in to reply
SUBSCRIBE TO OUR NEWSLETTER
C74 RSS Feed | © Copyright Cycling '74 | Terms & Conditions