xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <cam-batik-us...@aka.mcc.id.au>
Subject Re: Calling java methods from ECMASCRIPT (not solved at the list)
Date Tue, 15 Jun 2004 22:41:21 GMT
Gorka Garay:
> Thanks a lot for your so fast response.
> 
> I think you cannot call a non-static method from the TabbedPane in an static
> context, so I cannot do what you say : (

But you just need to call the non-static method on the reference that
you return to JavaScript.  One way of doing it would be to add a static
method to your MyJSVGCanvas class and have it pass in the current SVG
document as an argument.  Your MyJSVGCanvas could keep a track of the
MyJSVGCanvas instances that have been created so that it can then call
getSVGDocument on each one to find out which MyJSVGCanvas contains the
current document.  You can then return that object to the JavaScript,
which can call the non-static methods on it.

Hope this helps,

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922

---------------------------------------------------------------------
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