When I put alert() instead of alert I get a ava.lang.StackOverflowError at org.mozilla.javascript.ImporterTopLevel.has(ImporterTopLevel.java:101) at org.mozilla.javascript.ScriptableObject.getBase(ScriptableObject.java:15 83) at org.mozilla.javascript.ScriptableObject.hasProperty(ScriptableObject.jav a:1443) at org.mozilla.javascript.ScriptRuntime.bind(ScriptRuntime.java:1096) at org.mozilla.javascript.ScriptRuntime.getBase(ScriptRuntime.java:1106) at org.mozilla.javascript.gen.c1.call(Inline <script> file:/G:/HomeProjects/batik/intellij/multi.svg:73:4) at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1191) at org.mozilla.javascript.gen.c1.call(Inline <script> file:/G:/HomeProjects/batik/intellij/multi.svg:73:4) ...
Frederik -----Original Message----- From: Thomas DeWeese [mailto:[EMAIL PROTECTED] Sent: maandag 19 juli 2004 1:41 To: Batik Users Subject: Re: Backend driven svg application Frederik Santens wrote: > We have a notification engine that fire events when changes occur in the > backend system. Based upon those events we would like to update the > JSVGCanvas in correspondence with these backend data changes. The rate > at which those changes occur, is every 10 seconds, so, for performance > reasons, we are probably not able to rerender the svg each time (with a > setDocument(…)). We also want to avoid the blinking and the loss of the > zoom status that occurs when rerendering the svg in the JSVGCanvas. > > The ideal situation for us, would be to change the svg dynamically. I > tried calling a script (defined in the svg) from within the java code > but without success. You should be aware that you can modify the SVG Document from Java directly (as long as you do it from within the UpdateManager Thread). The most common mistake for systems like this is to fail to inform the canvas that the document should be treated as dynamic. This is done with: svgCanvas.setDocumentState(JSVGComponent.ALWAYS_DYNAMIC). > UpdateManager um = svgCanvas.getUpdateManager(); > > Interpreter ip = um.getBridgeContext().getInterpreter("text/ecmascript"); > > ScriptRun sr = new ScriptRun("alert", ip); This should probably be 'alert()'. > um.getUpdateRunnableQueue ( ).invokeLater(sr); > > What is going wrong? Or are there better approaches to tackle this problem. Does anything happen when you do this (exception etc?). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]