I believe I have discovered a bug in the Processing IDE. I am running Processing 1.5.1 on OS X Lion.
The bug pertains to the coloration of Java keywords, the built in PApplet functions, Processing constants and variables -- in short, any word that could be colored specially -- in the Processing text editor. Under normal circumstances, when typed in the IDE these words would appear in their respective colors only when capitalized correctly. The problem is that now these words show up in color despite capitalization. In fact, all of these words can be capitalized in any way and will still show up in color. For example, while only the first should show up in color, all of the following show up in green:
int
INT
inT (and so on for other capitalization permutations)
The same applies to PApplet methods (e.g. size, stroke, ellipse, which normally only show up in green when correctly camelCased), and Processing constants (e.g. RADIUS, CLOSE, BEVEL, which normally show up in blue only when fully capitalized).
While this glitch does not seriously affect development and in no way changes the execution of code (Java and therefore Processing is case-senstive so incorrectly capitalized terms cause compilation issues), it is a tad annoying to look at and can become confusing when using variables named "radius" and whatnot.
Does anyone else experience this problem, and if so is there a solution?
I run into an InstantiationException on line 7. Before adding the try/catch blocks I also had a NoSuchMethodException on line 6. This is my first time working with reflection so I'm sorry if the answer is obvious, but any clues on why this happens/how to fix it are greatly appreciated!
EDIT: I think I've got it! Looked around at a few threads and played around with different tabs/names. Now the only trouble is using methods in other classes to draw in the main class. At the moment I'm trying to use a PGraphics object to do so, is there a better way?