diff --git a/processing/serial/Serial.java b/processing/serial/Serial.java index 03de12f0f..bdbb4b284 100644 --- a/processing/serial/Serial.java +++ b/processing/serial/Serial.java @@ -4,7 +4,7 @@ PSerial - class for serial port goodness Part of the Processing project - http://processing.org - Copyright (c) 2004 Ben Fry & Casey Reas + Copyright (c) 2004-05 Ben Fry & Casey Reas This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -168,6 +168,23 @@ public class Serial implements SerialPortEventListener { } + /** + * Stop talking to serial and shut things down. + *

+ * Basically just a user-accessible version of dispose(). + * For now, it just calls dispose(), but dispose shouldn't + * be called from applets, because in some libraries, + * dispose() blows shit up if it's called by a user who + * doesn't know what they're doing. + */ + public void stop() { + dispose(); + } + + + /** + * Used by PApplet to shut things down. + */ public void dispose() { try { // do io streams need to be closed first? diff --git a/processing/todo.txt b/processing/todo.txt index 18b84f0a3..21d0b3de1 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -8,8 +8,7 @@ X get both versions of size() properly detected on export X get latest sonia from amit X remove particles from current processing X move netscape library out of libs and into build/shared - -_ add serial.stop() just like client/server +X add serial.stop() just like client/server _ remove PdeXxx prefixes on names, make PdeBase into just "Processing"