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 & HelpIntegration › 'Global classes in eclipse'
Page Index Toggle Pages: 1
'Global classes in eclipse' (Read 2010 times)
'Global classes in eclipse'
Jun 11th, 2010, 11:08am
 
Hi,
I have been structuring my work on eclipse but I can't get how to make a class visible to other classes;

usually in the pde variables or classes defined before the setup can be access from any other class, how can I do this in eclipse?

I need it to create class interaction and feedback loops between classes... do I need to build a special class to contain the other ones?

thx.
Re: 'Global classes in eclipse'
Reply #1 - Jun 11th, 2010, 12:06pm
 
It is hard to answer without knowing how you structured your files...

Usually, in Java, you put all classes in their own files, with the same name than the class itself. Ie. a class Spiral will live in a Spiral.java file.
If all files are in the same package (folder), there is nothing to do. But usually, the classes are declared public when they must be seen outside of their package.
Re: 'Global classes in eclipse'
Reply #2 - Jun 13th, 2010, 5:41am
 
Hey,
Thx, I figured it out... I was casting just the PApplet into the other classes but if I cast 'myProcessingSketch' class I can access all the variables and classes with the calling parent.
Eclipse is a really great environment for code development.
Cheers.
Page Index Toggle Pages: 1