We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
What is paint() ? (Read 337 times)
What is paint() ?
Feb 8th, 2009, 1:13pm
 
can someone try to run this?

//------- 8< ----------
void setup(){}
void draw() {}

void paint(){
   println("Hi from the paint() function ?!?!");
}
//------- >8 ----------

when I run it, the paint() function is called and prints out the message.

how is paint() called ? Am i losing it?
Is paint() special? Did I miss that in the refeence?
Thanks!

(v1.0.1, mac)
Re: What is paint() ?
Reply #1 - Feb 8th, 2009, 4:59pm
 
It is an internal method of PApplet, which, I think, isn't designed to be overridden like you do (plus you inhibit some re-painting mechanism, since you don't call super).
Re: What is paint() ?
Reply #2 - Feb 8th, 2009, 9:41pm
 
Thank you. I thought I was going mad...
Page Index Toggle Pages: 1