diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 1791c8a56..5bf10f2bf 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -799,7 +799,7 @@ public class PApplet extends Applet * when moving between pages), though. */ public void destroy() { - ((PApplet)this).exit(); + ((PApplet) this).dispose(); } @@ -1600,7 +1600,7 @@ public class PApplet extends Applet // If the user called the exit() function, the window should close, // rather than the sketch just halting. if (exitCalled) { - exit2(); + exitActual(); } } @@ -2585,7 +2585,7 @@ public class PApplet extends Applet if (thread == null) { // exit immediately, dispose() has already been called, // meaning that the main thread has long since exited - exit2(); + exitActual(); } else if (looping) { // dispose() will be called as the thread exits @@ -2600,11 +2600,12 @@ public class PApplet extends Applet dispose(); // now get out - exit2(); + exitActual(); } } - void exit2() { + + void exitActual() { try { System.exit(0); } catch (SecurityException e) { @@ -2612,6 +2613,7 @@ public class PApplet extends Applet } } + /** * Called to dispose of resources and shut down the sketch. * Destroys the thread, dispose the renderer,and notify listeners. @@ -2619,7 +2621,7 @@ public class PApplet extends Applet * Not to be called or overriden by users. If called multiple times, * will only notify listeners once. Register a dispose listener instead. */ - public void dispose(){ + public void dispose() { // moved here from stop() finished = true; // let the sketch know it is shut down time diff --git a/core/src/processing/core/PShapeSVG.java b/core/src/processing/core/PShapeSVG.java index 9f694d08b..b655a40ee 100644 --- a/core/src/processing/core/PShapeSVG.java +++ b/core/src/processing/core/PShapeSVG.java @@ -1824,7 +1824,7 @@ public class PShapeSVG extends PShape { * beneath them can be used here. *
* // This code grabs "Layer 3" and the shapes beneath it.
- * PShape layer3 = svg.getShape("Layer 3");
+ * PShape layer3 = svg.getChild("Layer 3");
*
*/
public PShape getChild(String name) {
diff --git a/core/todo.txt b/core/todo.txt
index 715f8e4f8..bb9384755 100644
--- a/core/todo.txt
+++ b/core/todo.txt
@@ -67,6 +67,8 @@ o needs to be documented, and excise all screen.width/height references
X add to the 'changes' document
X saveBytes() error when writing to existing file
X http://code.google.com/p/processing/issues/detail?id=667
+X destroy() in PApplet ultimately calls System.exit()
+X http://code.google.com/p/processing/issues/detail?id=698
opengl applets
X implement new applet-opengl.html based on the latest jogl
@@ -327,6 +329,16 @@ o textMode(SCREEN) is out of its league?
o textMode(SHAPE) and hint(SMOOTHING) calls are really awkward
o maybe need to add properties to the size() command?
o or use a getXxxx() method?
+o in PShape, getChild(name) refers to a