From: Bob J. <jac...@us...> - 2003-03-29 17:18:53
|
Update of /cvsroot/jmri/jmri/jmrix/nce In directory sc8-pr-cvs1:/tmp/cvs-serv20238 Modified Files: NceThrottle.java Log Message: add dummy dispatch and release Index: NceThrottle.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrix/nce/NceThrottle.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** NceThrottle.java 28 Mar 2003 17:14:22 -0000 1.5 --- NceThrottle.java 29 Mar 2003 17:18:50 -0000 1.6 *************** *** 156,164 **** /** * Dispose when finished with this object. After this, further usage of * this Throttle object will result in a JmriException. - * - * This is quite problematic, because a using object doesn't know when - * it's the last user. */ public void dispose() { --- 156,170 ---- /** + * Finished with this throttle. Right now, this does nothing, + * but it could set the speed to zero, turn off functions, etc. + */ + public void release() { + if (!active) log.warn("release called when not active"); + dispose(); + } + + /** * Dispose when finished with this object. After this, further usage of * this Throttle object will result in a JmriException. */ public void dispose() { |