We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have no clue why this is happening, but tabs are useless for me because classes in other tabs are not recognized.
I have checked my syntax a hundred times and can confirm with absolute certainty that all the syntax for my classes is 10000000% correct.
What is a possible reason for this problem?
Answers
how do we spot syntax errors in code that we can't see?
I'm approximately 87.65% that you have a missing or extra bracket {} on one tab, and the class is failing on the tab immediately after it. But without seeing your code... :-??
If all else fails, cutting and pasting all your tabs into one document and trying that as a separate sketch is a good way to pin this down.
It was really strange. Simply copying the classes from the other tabs and pasting them in the main tab made the sketch work, so I’m pretty sure it wasn’t a syntax error. Anyway, I worked on the sketch in the main tab for a while, then moved them back to seprate tabs and it worked fine.
It is so easy in copy and paste to miss a curley brace {} which would change the whole structure of the program.
Did you look at the 'Errors' tab in the IDE?
Sometimes the Processing IDE has an odd paste error where the last character of a paste to tab is not processed correctly. Never pinned it down, but it might have something to do with the copy (or the paste) not ending in a line break. Anyway, this sometimes might be why a closing bracket (the last character of a paste / in a tab) sometimes goes missing for the compiler even though the programmer did not forget to type it.
Although much of the type it is actually user error -- at least for me.
@jeremydouglass
I can confirm that the same or a similar bug is happening for me. It happened again and after deleting and retyping the last few characters in the paste, the class was recognized correctly.
Here is an open issue -- if you could contribute a comment about how exactly it is happening to you as well, that might help track down a solution.
https://github.com/processing/processing/issues/4649