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 › Difference in closing an applet
Page Index Toggle Pages: 1
Difference in closing an applet (Read 254 times)
Difference in closing an applet
Apr 13th, 2006, 4:40pm
 
There are a couple of ways to close an applet.. In processing at least, you can click the X in the corner of the window, or hit ESC, or even call exit(); from within the code.

My problem is that when closing the applet by clicking the X, it doesn't shut down properly.

take this example:
Code:

PApplet This = this;
void setup()
{
size(200,200);
new Disp();
}

void draw()
{

}

public class Disp{
Disp()
{
This.registerDispose(this);
}

void dispose()
{
println("EXITED");
}
}


This will output on ESC, and exit();, but not when the user closes the applet.

Is closing the applet with X, the same as closing the browser-window? or is it the same as hitting esc? ..

-seltar
Page Index Toggle Pages: 1