We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Ecplise processing - class structure problem.
Page Index Toggle Pages: 1
Ecplise processing - class structure problem. (Read 498 times)
Ecplise processing - class structure problem.
May 25th, 2009, 2:47am
 
Hi guys,
I have just started to build processing in Eclipse but i have some problems implementing different classes.

I make 1 main class and tried to make some other classes that i want to control from the main class, but somehow i keep getting the same error:

Exception in thread "Animation Thread" java.lang.NullPointerException
     at processing.core.PApplet.fill(PApplet.java:7704)
     at nl.rackdoll.CircleTest.draw(CircleTest.java:9)
     at nl.rackdoll.CircleBuilder.draw(CircleBuilder.java:20)
     at processing.core.PApplet.handleDraw(PApplet.java:1423)
     at processing.core.PApplet.run(PApplet.java:1328)
     at java.lang.Thread.run(Unknown Source)


So i made a package( nl.rackdoll ), in that there is my main class, nect to that i have a class that is in same package only one lvl deeper ( nl.rackdoll.test ) . I want to make an instance of that class in my main class and then controll it, but it somehow giefs me that error...

Does anyone know what i am doing wrong ?
Both classes extend PApplet and both classes import the Processing.core. *;

Maybe someone got a demo project for me so i can see how structures work in processing ecplise ?

thnx in advance!
Rackdoll..
Re: Ecplise processing - class structure problem.
Reply #1 - May 25th, 2009, 3:18am
 
Rackdoll wrote on May 25th, 2009, 2:47am:
Both classes extend PApplet

I believe that's the core of your problem, from what I have read, you can have only one class extending PApplet per project (the main class).
Have you read Processing in Eclipse article It might answer some of your questions.
Re: Ecplise processing - class structure problem.
Reply #2 - May 25th, 2009, 3:40am
 
Ahh yesh, thnx!
Did jump right to another tut  so i missed the bottom part...
Thnx for mentioning it! appreciate the fast responds!

Grin
Page Index Toggle Pages: 1