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.
IndexProgramming Questions & HelpSyntax Questions › Restart whole application
Page Index Toggle Pages: 1
Restart whole application ? (Read 540 times)
Restart whole application ?
Aug 26th, 2006, 7:55pm
 

Hi Casey and everybody,

could anyone tell me please how I can restart my whole application in an elegant way
(the app-window with background should stay as it is).

I'm building an exhibiton setup and visitors should be able to restart the application just with one mouseclick (I'll fix the mouse on the wall that it only works as a button....

thanks in advance,
Susanne
Re: Restart whole application ?
Reply #1 - Aug 26th, 2006, 8:04pm
 
you can try this:

void mousePressed(){
 setup();
}
Re: Restart whole application ?
Reply #2 - Aug 26th, 2006, 10:40pm
 
don't call setup() (or draw() for that matter) yourself, that's more than likely to cause trouble, even if it appears to be ok.

you'd be better off splitting setup() between things that only need to happen once (which should remain in setup) and things that should happen when you want to restart. put the latter stuff in a function called restart(), and call it at the end of setup().
Re: Restart whole application ?
Reply #3 - Aug 27th, 2006, 12:46am
 
Thank you very much!
Susanne
Page Index Toggle Pages: 1