We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello -
I have a sketch that uses data from calls.txt in my /data directory. When I export this to javascript, calls.txt appears in the web-export folder, but the sketch displays a blank window in the browser.
I understand that processing.js doesnt have a /data directory. So how do I get a the contents of a file (/data/calls.txt) into a format that can be read by a Processing sketch exported to javascript? Do I have to convert it to .xml? Does loadStrings even work in javascript mode?
Processing 2.0b3 on a mac.
Any pointers greatly appreciated.
/stf
Answers
Hit F12 and check your browser console output. If testing with local files it could be a well documented browser security issue with loading local files...
When using Processing load methods, don't explicitly request "data/" subfolder even in "Java Mode".
For example: don't use
loadStrings("/data/calls.txt");
, justloadStrings("calls.txt");