Thread: [Java-gnome-developer] Error with glade
Brought to you by:
afcowie
From: Pablo B. <pb...@uo...> - 2003-05-29 02:08:52
Attachments:
Ui.java
gnomencoder.glade
|
Hi!!! I'm new to the list, I'm trying to get Java-Gnome working but I get this error message: could not create widget: could not find constructor: org.gnu.gnome.App(int) xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H xml_connect: skipping X(Dp(D(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H(?$H Exception in thread "main" org.gnu.glade.GladeXMLException: invalid source widget handle at org.gnu.glade.LibGlade.connect(LibGlade.java:159) at org.gnu.glade.LibGlade.glade_xml_signal_autoconnect_full(Native Method) at org.gnu.glade.LibGlade.<init>(LibGlade.java:113) at org.gnu.glade.LibGlade.<init>(LibGlade.java:82) at org.gnu.glade.LibGlade.<init>(LibGlade.java:54) at net.sourceforge.jnomencoder.gnomeui.Ui.<init>(Ui.java:34) at net.sourceforge.jnomencoder.gnomeui.Ui.main(Ui.java:50) I get that error with the program and glade file attached. The glade file is big, because I'm porting a little application I made with Gtk# to java-gnome. Can you help me with this? TIA! -- Pablo Baena <pb...@uo...> |
From: Mark H. <mh...@ca...> - 2003-05-29 10:36:48
|
On Thu, 2003-05-29 at 00:02, Pablo Baena wrote: > Hi!!! I'm new to the list, I'm trying to get Java-Gnome working but I > get this error message: > > could not create widget: could not find constructor: org.gnu.gnome.App(int) The int constructor exists as part of gtk.Window, which App extends, so I'd have thought this should work. I've never used glade or libglade, so could be wrong. Are you using the latest code from cvs? Which flavour of Java are you using? -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Pablo B. <pb...@uo...> - 2003-05-29 13:24:44
|
On Thu, 2003-05-29 at 10:36, Mark Howard wrote: > On Thu, 2003-05-29 at 00:02, Pablo Baena wrote: > > Hi!!! I'm new to the list, I'm trying to get Java-Gnome working but I > > get this error message: > > > > could not create widget: could not find constructor: org.gnu.gnome.App(int) > > The int constructor exists as part of gtk.Window, which App extends, so > I'd have thought this should work. I've never used glade or libglade, so > could be wrong. > You never used glade? It's so nifty! It's the main thing that I like from Gtk. Maybe that's why java-gnome is not having the attention it deserves, the complexity of creating a Gtk UI by hand surely isn't attractive to java developers familiar to RAD tools. I've observed that the problem is with that particular glade file I attached. Changing it for another newly created gnome app works right away. The lines showing xml_connect: skipping <garbage> seem suspect, like if java-gnome were corrupting the data when passing it to libglade. I can only wonder because I'm so new to java AND java-gnome. > Are you using the latest code from cvs? > Which flavour of Java are you using? Sorry I didn't include this info. I'm using java-gnome from cvs, and Sun's j2sdk-1.4.1.01. I tried with gcj-3.3 with the same results, whell, only a little longer (BTW: congrats for the excellent building scripts, compiling with gcj was so straightforward): could not create widget: could not find constructor: org.gnu.gnome.App(int) xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g xml_connect: skipping ???@?g Exception in thread "main" java.lang.reflect.InvocationTargetException at _Jv_CallAnyMethodA(java.lang.Object, java.lang.Class, _Jv_Method, boolean, java.lang.Class[], jvalue, jvalue) (/usr/lib/libgcj.so.4.0.0) at g_hash_table_foreach (/usr/lib/libglib-2.0.so.0.200.1) at glade_xml_signal_autoconnect_full (/usr/lib/libglade-2.0.so.0.0.1) at Java_org_gnu_glade_LibGlade_glade_1xml_1signal_1autoconnect_1full (/home/tetsuo/n/libGladeJava.so) at org.gnu.glade.LibGlade.glade_xml_signal_autoconnect_full() (/home/tetsuo/n/libGladeJar.so) at org.gnu.glade.LibGlade.LibGlade(java.io.InputStream, java.lang.Object, java.lang.String) (/home/tetsuo/n/libGladeJar.so) at org.gnu.glade.LibGlade.LibGlade(java.lang.String, java.lang.Object, java.lang.String) (/home/tetsuo/n/libGladeJar.so) at org.gnu.glade.LibGlade.LibGlade(java.lang.String, java.lang.Object) (/home/tetsuo/n/libGladeJar.so) at Ui.Ui(java.lang.String[]) (Unknown Source) at Ui.main(java.lang.String[]) (Unknown Source) Caused by: org.gnu.glade.GladeXMLException: invalid source widget handle at _ZN4java4lang11VMThrowable16fillInStackTraceEPNS0_9ThrowableE (/usr/lib/libgcj.so.4.0.0) at _ZN4java4lang9Throwable16fillInStackTraceEv (/usr/lib/libgcj.so.4.0.0) at _ZN4java4lang9ThrowableC1EPNS0_6StringE (/usr/lib/libgcj.so.4.0.0) at _ZN4java4lang9ExceptionC1EPNS0_6StringE (/usr/lib/libgcj.so.4.0.0) at _ZN4java2io11IOExceptionC1EPNS_4lang6StringE (/usr/lib/libgcj.so.4.0.0) at _ZN3org3gnu5glade17GladeXMLExceptionC1EPN4java4lang6StringE (/home/tetsuo/n/libGladeJar.so) at _ZN3org3gnu5glade8LibGlade7connectEPN4java4lang6StringEiS6_S6_ib (/home/tetsuo/n/libGladeJar.so) at _Z18_Jv_CallAnyMethodAPN4java4lang6ObjectEPNS0_5ClassEP10_Jv_MethodbP6JArrayIS4_EP6jvalueSB_ (/usr/lib/libgcj.so.4.0.0) at g_hash_table_foreach (/usr/lib/libglib-2.0.so.0.200.1) at glade_xml_signal_autoconnect_full (/usr/lib/libglade-2.0.so.0.0.1) at Java_org_gnu_glade_LibGlade_glade_1xml_1signal_1autoconnect_1full (/home/tetsuo/n/libGladeJava.so) at _ZN3org3gnu5glade8LibGlade33glade_xml_signal_autoconnect_fullEv (/home/tetsuo/n/libGladeJar.so) at _ZN3org3gnu5glade8LibGladeC1EPN4java2io11InputStreamEPNS3_4lang6ObjectEPNS7_6StringE (/home/tetsuo/n/libGladeJar.so) at _ZN3org3gnu5glade8LibGladeC1EPN4java4lang6StringEPNS4_6ObjectES6_ (/home/tetsuo/n/libGladeJar.so) at _ZN3org3gnu5glade8LibGladeC1EPN4java4lang6StringEPNS4_6ObjectE (/home/tetsuo/n/libGladeJar.so) at _ZN3gnu3gcj7runtime11FirstThread9call_mainEv (/usr/lib/libgcj.so.4.0.0) at _ZN3gnu3gcj7runtime11FirstThread3runEv (/usr/lib/libgcj.so.4.0.0) at _Z13_Jv_ThreadRunPN4java4lang6ThreadE (/usr/lib/libgcj.so.4.0.0) at _Z11_Jv_RunMainPN4java4lang5ClassEPKciPS4_b (/usr/lib/libgcj.so.4.0.0) at JvRunMain (/usr/lib/libgcj.so.4.0.0) at __libc_start_main (/lib/libc-2.3.1.so) Regards! -- Pablo Baena <pb...@uo...> |
From: Mark H. <mh...@ca...> - 2003-05-29 17:15:09
|
On Thu, 2003-05-29 at 14:32, Pablo Baena wrote: > I'm debugging this. The problem seems to be, as you said, that App has > not a int constructor. > > I don't understand yet how the defs file works, but I'm trying to make > it work. The attached glade file triggers the error and is much > smaller. Can you send a copy of a glade file which works too please to compare the differences. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Pablo B. <pb...@uo...> - 2003-05-29 20:54:14
|
It's the delete_event signal that, when LibGlade tries to connect it, crashes. Removing the line: <signal name="delete_event" handler="on_app1_delete_event" last_modification_time="Thu, 29 May 2003 12:14:49 GMT"/> from the file I attached, should work. It's confirmed that adding this constructor to org.gnu.gnome.App, the glade file is loaded perfectly: public App(int handle) { super (handle); } Cheers! On Thu, 2003-05-29 at 17:12, Mark Howard wrote: > On Thu, 2003-05-29 at 14:32, Pablo Baena wrote: > > I'm debugging this. The problem seems to be, as you said, that App has > > not a int constructor. > > > > I don't understand yet how the defs file works, but I'm trying to make > > it work. The attached glade file triggers the error and is much > > smaller. > > Can you send a copy of a glade file which works too please to compare > the differences. -- Pablo Baena <pb...@uo...> |
From: Jeffrey M. <ku...@zo...> - 2003-05-30 00:14:32
|
Thanks for the info. I have checked this change into cvs. On Thu, 2003-05-29 at 13:48, Pablo Baena wrote: > It's the delete_event signal that, when LibGlade tries to connect it, > crashes. Removing the line: > <signal name="delete_event" handler="on_app1_delete_event" last_modification_time="Thu, 29 May 2003 12:14:49 GMT"/> > from the file I attached, should work. > > It's confirmed that adding this constructor to org.gnu.gnome.App, the > glade file is loaded perfectly: > > > public App(int handle) { > super (handle); > } > Cheers! > > On Thu, 2003-05-29 at 17:12, Mark Howard wrote: > > On Thu, 2003-05-29 at 14:32, Pablo Baena wrote: > > > I'm debugging this. The problem seems to be, as you said, that App has > > > not a int constructor. > > > > > > I don't understand yet how the defs file works, but I'm trying to make > > > it work. The attached glade file triggers the error and is much > > > smaller. > > > > Can you send a copy of a glade file which works too please to compare > > the differences. > > > -- > > Pablo Baena <pb...@uo...> -- Jeffrey Morgan <ku...@zo...> |
From: Pablo B. <pb...@uo...> - 2003-05-30 03:56:27
|
Great! So there's no need to change the ref files? Aren't the .java files generated? Won't this change be lost then? On Thu, 2003-05-29 at 07:55, Jeffrey Morgan wrote: > Thanks for the info. I have checked this change into cvs. > > On Thu, 2003-05-29 at 13:48, Pablo Baena wrote: > > It's the delete_event signal that, when LibGlade tries to connect it, > > crashes. Removing the line: > > <signal name="delete_event" handler="on_app1_delete_event" last_modification_time="Thu, 29 May 2003 12:14:49 GMT"/> > > from the file I attached, should work. > > > > It's confirmed that adding this constructor to org.gnu.gnome.App, the > > glade file is loaded perfectly: > > > > > > public App(int handle) { > > super (handle); > > } > > Cheers! > > > > On Thu, 2003-05-29 at 17:12, Mark Howard wrote: > > > On Thu, 2003-05-29 at 14:32, Pablo Baena wrote: > > > > I'm debugging this. The problem seems to be, as you said, that App has > > > > not a int constructor. > > > > > > > > I don't understand yet how the defs file works, but I'm trying to make > > > > it work. The attached glade file triggers the error and is much > > > > smaller. > > > > > > Can you send a copy of a glade file which works too please to compare > > > the differences. > > > > > > -- > > > > Pablo Baena <pb...@uo...> -- Pablo Baena <pb...@uo...> |