-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class does not exist error when sketch only contains class definitions #5076
Comments
Why would you do this? Processing is not a Java IDE. The code in question doesn't make any sense. Is this trying to make something or just figuring out weird ways to break the preprocessor? |
I'm guessing that the OP started writing a sketch that was going to require classes, so added the class definitions, and then got scared when they started seeing an error. |
I think there are better ways for us to spend all the time I don't have to fix the other 335 issues in here… Really appreciate you keeping an eye on SO, though at the end of the day this is too far into “why isn't this a Java IDE?” territory. |
I understand, and I'm with you. Just thought it was slightly strange behavior. Although now that I'm thinking about it, it makes more sense since I gather that there are two kinds of sketch: "script-like" sketches that don't contain functions (just functions calls), and "real" sketches that contain functions like |
Yeah, makes sense—thanks again. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
From this Stack Overflow post:
Paste this into the Processing editor:
You'll get an error on line 2 saying
The class "Two" does not exist
. Now reverse the order of the classes:Now you get an error on line 2 saying
The class "One" does not exist
. Apparently the order matters with class definitions?But now if you add a
setup()
function to the sketch, everything is hunky-dory:The text was updated successfully, but these errors were encountered: