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 › Starting out in Java mode
Page Index Toggle Pages: 1
Starting out in Java mode (Read 813 times)
Starting out in Java mode
Feb 24th, 2006, 11:08am
 
Hello all, first post in the forums after using Processing for about...45 minutes!

I've started a very basic program in Processing to get to grips with how it handles & executes - I went with the Java mode as I have a decent Java/C#/OO background and my ultimate goal will require something more complex than the basic or continuous modes.

I have two PDE files in my sketchbook, a "main" class called MovingBlocks and another class called Square. Basically MovingBlocks spawns multiple Square objects and displays them. However, when I try to run the program, the compiler complains that Square has no width/height properties & methods such as fill() and rect() do not exist. I've looked through Daniel Shiffman's examples (thanks, by the way!) and cannot see any structural differences from my code.

I'm guessing there's a problem in the way that I "execute" my program which is causing Square not to be incorporated into MovingBlocks, thus getting the methods from processing (being treated as a normal Java file instead of a Processing file).

Apologies if this is a bit vague, quite hard to communicate non syntax/programming problems! Any input would be greatly appreciated to get me over this little hurdle, cheers.
Re: Starting out in Java mode
Reply #1 - Feb 24th, 2006, 11:12am
 
Okay, I re-read the Environment documentation - learnt about the code/ subdirectory.

A rather embarrasing start to the forums :$
Page Index Toggle Pages: 1