Question

To make a long story short I have to use processing in a class and I'm completely blind. The ide is completely inaccessible so I use the JavaScript version of processing to create a page and have a sited person describe the output to me. Unfortunately if the code has errors the page appears blank and there is no explanation of what’s wrong. Given the following code is there a way for the JavaScript version of processing to tell me that I have a syntax error since I forgot );

void setup()
{
  size(500, 500);
}

void draw()
{
  line(250, 200, 250, 40
}
Was it helpful?

Solution

Well for debuging (when the code compiles) you can use the println() command.

I've been using processing for 2 months now and i have the same problem and haven't been able to find a solution for it.

Here in SO for what I've seen almost no one uses Processing or knows how to use it. You can try the processing forums, you'll normally get an answer in a day or two. You can find that here http://processing.org/discourse/

Sorry for not being able to help. The other only solution I see is if you use their PDE (Processsing develop environment) and compile it there.

Edit: From previous experience asking processing questions you won't even have much ppl looking into your question :(

OTHER TIPS

A js editor with syntax highlighting (such as Aptana) will show you errors such as you have there.

I don't know whether you'd find that any more useful than the Processing ide itself, though.

When you open the page in a browser, make sure you have the developer tools open. They come with every major browser (look in the tools menu), and include a JavaScript console. This will include any errors you get from the Processing.js parser.

I'm not sure if there are more accessible versions of the developer tools, but that would be a good place to start.

in processing.js, use createCanvas(); instead of size, thus: createCanvas(500, 500);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top