Javascript API in standalone (OS X)
Hello,
I'm having trouble getting javascript scripting to work in a standalone - it is giving an error that 'this.patcher' is undefined.
I've tried following advice here:
https://cycling74.com/docs/max5/tutorials/jit-tut/jitterappendixd.html
but I don't seem to have the recommended file anywhere (JSRefThreadsafe.shlb).
Any suggestions? Or might I have missed something more fundamental? Everything works fine as a patch.
Tom
post patch? or a small bit of it that shows the issue?
The problem seems more specific than I had originally thought. It might have been because I was putting the js manually inside the app package.
I'm still getting some problems from the app though. The example attached works fine in the patch, but doesn't create the nsliders in the .app version (nslider: no such object). Javascript example test.js is pasted below followed by Max patch (can you embed js?).
var blankObj = new Array();
objCount = 0;
var num = this.patcher.getnamed("testNum");
function bang() {
num.set(Math.random() * 100);
}
function createObj() {
blankObj[objCount] = this.patcher.newdefault(10 + (objCount * 100), 10, "nslider");
objCount++;
}
will check it out in morning....