Error calling redraw() from static method
in
Programming Questions
•
3 years ago
Compiler says:
Cannot make a static reference to the non-static method redraw() from the type PAppletWhy should I care about "redraw" method definition? Since compiler is making a trick assuming all this pseudo orphaned methods and variables are defined in PApplet, why can't it also assume they are static?
Update: Let's suppose I have my application working in a "redraw on event" mode and I've designed an static class with transformation methods that modify objects with visual impact and I want to make a redraw after applying the change.
What bothers me is: there are some methods and variables without explicit context. Since compiler is giving them an implicit context (breaking somehow object orientation), why don't make them static? Or, in other way, where is the static access to that implicit context to use it to call "redraw"?
Regards,
Mario
1
