Get Jitter jit.textfile into javascript js

    Nov 19 2013 | 6:52 pm
    I'm using jit.uldl to download a long text string from my website. Then I use jit.textfile to view it as text. But now I need to get that text into a js object and I'm having trouble. I used to use jit.str.tosymbol but symbols are limited to 2047 characters. So I need to get the jit.textfile output directly into javascript. Can you please help? I've looked everywhere and can't seem to find any help on this.
    I've been successful at getting the jitter matrix into javascript, but I don't know how to look at the text string.

    • Nov 19 2013 | 7:07 pm
      I suppose one option is to save the jit.textfile as a text file and then reload that into javascript. But is there a direct way to pass jit.textfile to javascript?
    • Nov 19 2013 | 7:12 pm
      You could try my mxj utility to download a url:
      this will output the url content and you can pipe directly to js..
    • Nov 19 2013 | 7:32 pm
      Brilliant! Thank you! I'll give it a try.
    • Nov 19 2013 | 7:50 pm
      Nat, would this be possible inside of javascript? So I can just make a GET call directly within javascript and bypass all this extra patching?
    • Nov 19 2013 | 7:53 pm
      Sadly I don't think so, I don't think we have access to that api from javascript, that's why I did the java object...
    • Nov 19 2013 | 10:38 pm
      Nat, your utility worked for a short string, but when I tried to get a long string (roughly 3000 characters), max just crashes/closes without any warnings or anything. Any idea what that could be about? The string that the website is returning looks similar to the attached file.
    • Nov 19 2013 | 10:43 pm
      seems to work here with the attachment, can you share the url of the data ?
    • Nov 19 2013 | 10:57 pm
      Ok, so is the long one (which crashes max for me) and is the short one which works. Do they both work for you?
      I wonder if it's some sort of java issue on my end?
      Thanks for your help with this btw!
    • Nov 19 2013 | 11:09 pm
      That's strange, both work for mw here... what's your os, max version ?
    • Nov 19 2013 | 11:29 pm
      windows 7, max 6.0.7. It's weird. It just closes max the second I try and parse the url. I've had that problem when working with mxj objects in the past. No idea what's up. I may just have to do multiple jit.uldl calls to get the string in smaller chunks.
      Thanks a ton for your help tho. Maybe I'll try your object on max 6.1 and windows 8. Is there a place I can view some java logs?