Problem with multiple classes in Eclipse
in
Programming Questions
•
2 years ago
I've set up eclipse as instructed in the main tutorial on processing.org. Everything works perfectly with simple examples.
Now I've written a bunch of code to search through an xml database and draw an ellipse for each node and a connection between related nodes.
When I place my draw commands in the actual draw() block I get the following error:
Exception in thread "Animation Thread" java.lang.NullPointerException
at xmlparse.draw(xmlparse.java:48)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
However, every now and the code runs without problem just by recompiling, which I find very strange...
However if I place the same code in the setup() block I receive no errors and the code runs perfectly.
Any insights or ideas into why this may be would be much appreciated,
Thanks.
HS
Now I've written a bunch of code to search through an xml database and draw an ellipse for each node and a connection between related nodes.
When I place my draw commands in the actual draw() block I get the following error:
Exception in thread "Animation Thread" java.lang.NullPointerException
at xmlparse.draw(xmlparse.java:48)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
However, every now and the code runs without problem just by recompiling, which I find very strange...
However if I place the same code in the setup() block I receive no errors and the code runs perfectly.
Any insights or ideas into why this may be would be much appreciated,
Thanks.
HS
1