Hi,

It worked!

I added an static field to MyJSVCanvas which I reference to "this" at the
constructor so I can statically access that static field and call non-static
methods through it.

Thanks a lot Cameron.

I guess it wonŽt happen frequently, but IŽll try to help you all as you have
helped me.

YouŽre really great.


----- Original Message ----- 
From: "Gorka Garay" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Sent: Wednesday, June 16, 2004 10:24 AM
Subject: Re: Calling java methods from ECMASCRIPT (not solved at the list)


> Ok, I think I see what you mean.
>
> Thanks a lot, I will try and tell you the results.
>
>
>
>
> ----- Original Message ----- 
> From: "Cameron McCormack" <[EMAIL PROTECTED]>
> To: "Batik Users" <[EMAIL PROTECTED]>
> Sent: Wednesday, June 16, 2004 12:41 AM
> Subject: Re: Calling java methods from ECMASCRIPT (not solved at the list)
>
>
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to