Javascript API in standalone (OS X)

    Jul 19 2013 | 5:46 pm
    Hello, I'm having trouble getting javascript scripting to work in a standalone - it is giving an error that 'this.patcher' is undefined.
    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.

    • Jul 20 2013 | 8:38 pm
      post patch? or a small bit of it that shows the issue?
    • Jul 20 2013 | 9:04 pm
      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++; }
    • Jul 20 2013 | 10:45 pm
      will check it out in morning....