xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: Backend driven svg application
Date Mon, 19 Jul 2004 13:39:22 GMT
Frederik Santens wrote:

> I had a javascript function named "alert" which just called
> alert("Helloworld"); 
> 
> When I called my alert js function from within java
> (Interpeter.evaluate("alert()")) I got this StackOverflowError. When I
> changed the name of the function to 'displayMessage' it worked. Probably
> something with reserved words.

   Well just confusion about which 'alert' function to call, in JS
there is no function overloading so your 'alert' function called
itself.

> Can I pass references to custom objects to the javascript too?

    Yes, although you'll have to work at it a bit since you can't
easily reference your custom object from the string.  The easiest
thing to do is use 'bind' to associate your custom object with
a global variable in JS, then have your function just use that
global var - Iky, I know.  Also be careful as it is really easy to
introduce memory leaks this way.

> You mentioned also in the previous reply that I don't need javascript to
> do the dynamic updates of my rendered svg. Do you mean manipulating the
> DOM tree via the updatemanager thread is the alternative way of doing
> this or are there other ways?

    This is what I mean.  Once you are running in the Update manager
thread you can just manipulate the DOM tree using Java.  What other
way did you have in mind?


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message