add a stop() to destroy() to prevent thread issues

This commit is contained in:
benfry
2004-07-15 15:01:33 +00:00
parent a984ec5d3d
commit 81bc77a7fe
2 changed files with 25 additions and 12 deletions

View File

@@ -241,9 +241,23 @@ public class PApplet extends Applet
}
// public void destroy() is another one that gets called as the
// applet viewer is shutting down the applet. stop() is called
// first, and then destroy() to really get rid of things.
/**
* This also calls stop(), in case there was an inadvertent
* override of the stop() function by a user.
*
* destroy() supposedly gets called as the applet viewer
* is shutting down the applet. stop() is called
* first, and then destroy() to really get rid of things.
* no guarantees on when they're run (on browser quit, or
* when moving between pages), though.
*/
public void destroy() {
if (thread != null) {
// call stop since this prolly means someone
// over-rode the stop() function
stop();
}
}
public Dimension getPreferredSize() {

View File

@@ -62,11 +62,10 @@ X if people have other threads they've spawned, impossible to stop
X api to properly sense when applet has focus
X add a 'focused' variable to the applet
X code now in zipdecode, maybe just list this as a standard thing?
X include a lerp()? is there one in flash?
X http://processing.org/discourse/yabb/YaBB.cgi?board=Programs;action=display;num=1083289030
X should it be called lerp or mix?
X acos, asin, log, exp, ceil/floor, pow, mag(x,y,z)
X acos, asin, atan, log, exp, ceil/floor, pow, mag(x,y,z)
X color issues
X doesn't work when outside a function:
X color bg_color = color(255,0,0);
@@ -74,15 +73,14 @@ X colorMode broken for red() green() etc
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1068664455
X add color(gray) and color(gray, alpha)
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1089898189;start=0
o update() mode needs to be hacked in (?)
X make 'online' a boolean
MEGABUCKET (api)
_ passing in args[] from main
_ light(x, y, z, c1, c2, c3, TYPE)
_ also BLight with same constructor, and on() and off() fxn
_ include in the docs: don't override stop()
_ or handle this some more intelligent way, super.stop() is needed.
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1083574943
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1067383998
_ angleMode(DEGREES) and angleMode(RADIANS)
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1075507381;start=0
_ figure out how to handle cached images, multiple images
@@ -103,9 +101,10 @@ _ slice, splice, reverse, concat, split
_ more blend() modes? (the five listed on the thread below?)
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1082056702
_ seems like semi-standard modes
_ update() mode needs to be hacked in (?)
_ make 'online' a boolean
_ write a threading example
_ or handle this some more intelligent way, super.stop() is needed.
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1083574943
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1067383998
_ illustrator export / rendering mode
_ also postscript or pdf export?