After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 318944 - MozEmbed.java callback method error
MozEmbed.java callback method error
Status: RESOLVED FIXED
Product: java-gnome
Classification: Bindings
Component: General
mainline
Other Linux
: Normal normal
: ---
Assigned To: java-gnome bindings maintainers
java-gnome bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-15 14:38 UTC by Remy Suen
Modified: 2006-02-16 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to overload two callback handling methods to allow it to work for Firefox 1.0.x and Firefox 1.5.x. (1.42 KB, patch)
2006-02-14 23:16 UTC, Remy Suen
none Details | Review

Description Remy Suen 2005-10-15 14:38:48 UTC
Distribution/Version: Gentoo

An exception is thrown when a MozEmbed object is added and a listener is added
to it.

The error message displayed is:
java.lang.Exception: Java-GNOME - cannot find callback method handleProgressAll
in the specified object with signature (Lorg/gnu/glib/Handle;II)V

From examining the source code, passing a String should be the correct parameter.

Test Case:
import org.gnu.gtk.Gtk;
import org.gnu.gtkmozembed.MozEmbed;
import org.gnu.gtkmozembed.event.NetEvent;
import org.gnu.gtkmozembed.event.NetListener;

public class test {
	public static void main(String[] args) {
		Gtk.init(args);
		MozEmbed me = new MozEmbed();
		me.addNetListener(new NetListener() {
			public void netStart(NetEvent e) {}
			public void netStop(NetEvent e) {}
			public void netStateAllChange(NetEvent e) {}
			public void netStateChange(NetEvent e) {}
			public void progressAllUpdate(NetEvent e) {}
			public void progressUpdate(NetEvent e) {}
		});
		Gtk.main();
	}
}
Comment 1 Remy Suen 2005-12-04 14:06:48 UTC
It seems that the error has disappeared now that I've installed Firefox 1.5.
Nonetheless, the code was originally passing a Handle in, which must have worked
for Nick when he committed the bindings and example applications to cvs, so the
cause of why a String works for some and a Handle works for others is still up
in the air.
Comment 2 Remy Suen 2006-02-14 23:16:51 UTC
Created attachment 59381 [details] [review]
Patch to overload two callback handling methods to allow it to work for Firefox 1.0.x and Firefox 1.5.x.

I hope this works for others, but overloading a callback method seems kind of iffy in my opinion.
Comment 3 Remy Suen 2006-02-16 11:12:16 UTC
Committed to CVS head with a slightly different patch to actually set the URI of the event, which was missing from the patch attached here.