We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey everyone, I have a quick question about using another IDE for Processing. I have successfully made IntelliJ IDEA work with Processing by including the classpaths with the Java sdk as a separate sdk for processing. My only issue so far arises when I try to have multiple classes in the project. It seems that even though I extend PApplet for each class I write, the PGraphics object "g" is not properly being set. Whenever I try to do something involving graphics in a separate class like modifying the stroke, fill or drawing an ellipse I get a NullReferenceException. After some debugging, I discovered that g is not being assigned. As a quick workaround, I am passing the main class's g to every constructor, but that feels clunky. Does anyone know of a better way to do this?
Answers
No, that's the way to do it.