From: Ken A. <kan...@bb...> - 2004-08-19 18:37:54
|
Since TimerTask is abstract you need to subclass it. Here's one way to do it. (load "dclass/dclass.scm") (define-class (package frog) (public class TimerTask) (public void run () ... do something ... )) You could also do it this way: package foo; import jscheme.JScheme; public class TimerTask extends java.util.TimerTask { public void run() { JScheme js = new JScheme(); js.load(new java.io.File("code.scm")); // Load scheme code. js.call("run"); } } At 10:15 AM 8/19/2004 -0700, david wrote: >This is probably obvious but .. > >I need to schedule a jscheme procedure to run >in a servlet container and can't work out how to >pass the Task to the timer. Do I need to do JS.eval >or something like that? > > > > >------------------------------------------------------- >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |