Re: java callbackks

From: David Huynh <dfhuynh_at_csail.mit.edu>
Date: Tue, 20 Dec 2005 15:54:59 -0500

Andrew,

Unfortunately I think you're trying the impossible, at least at the
moment, because I have tried for the same thing and failed twice before
(on Windows). Perhaps with more native support for Java in Firefox, we
can hope to have callbacks.

If you can tell me more specifically why you need the Java backend to
send messages back to the frontend, perhaps I can suggest a user
interface solution that does not require the callback.

David


Andrew Harrison wrote:
> Hi,
>
> I apologise in advance for sending this message to this list because
> it's not a PiggyBank question. But there are few places that have as
> much expertise with Firefox and Java. And I'm stuck...
>
> So I'm trying to add a JS Object that is invoked from XUL as a
> listener to a back-end Java class, in order for the Java class to send
> messages into Firefox. The Java class has a method:
>
> void addJSListener(JSObject jsobject);
>
> The JS Object calls on the Javascript-Java 'bridge' component in the
> extension to invoke this Java method, giving itself as a parameter
> ('this'). But when the component arrives in Java it's null - the
> JSObject.toString() returns 'null'. If I try and print the JSObject
> parameter I get a null pointer exception. If I invoke a method on the
> JSObject like eval or call I don't get an exception, but nothing
> happens, which is frustrating.
>
> Most of the documentation I can find on JSObject presumes the Java
> side object is an Applet, which mine isn't.
>
> So the question is, am I trying to do the impossible (i.e. use
> JSObject not from an Applet)? Also I'm using a Mac (with Firefox 1.5)-
> could this be an issue? Or am I just missing something stupid?
>
> Optimistically thanks in advance,
>
> Andrew
>
>
Received on Tue Dec 20 2005 - 20:48:03 EST

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:18 EDT