Thread: [Java-gnome-developer] big problems with glade
Brought to you by:
afcowie
From: Rafael F. <ra...@op...> - 2005-01-19 07:18:00
|
Hey everyone, sorry if this a stupid question but I get this crazy error: (process:8475): GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed, use g_type_init() prior to this function (process:8475): GLib-GObject-CRITICAL **: file gobject.c: line 819 (g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:8475): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed org.gnu.glade.GladeXMLException: file glade-xml.c: line 180 (glade_xml_construct): assertion `self != NULL' failed at org.gnu.glade.LibGlade.glade_xml_new(Native Method) at org.gnu.glade.LibGlade.<init>(LibGlade.java:93) at org.ophion.jyum.JyumGui.<init>(JyumGui.java:36) at org.ophion.jyum.Jyum.main(Jyum.java:22) whenever I instanciate a new object of the type below: public final class JyumGui { private LibGlade gladexml; private final String XML = "/home/rafael/dev/Jyum/glade/gyum.glade"; private final String XML_ROOT = "Jyum"; private static final String PROGRAM_NAME="Jyum"; private static final String PROGRAM_VERSION = "0.001"; /* * Constructor */ public JyumGui() { try { gladexml = new LibGlade(XML,this,XML_ROOT); } catch (GladeXMLException e) { e.printStackTrace(); System.exit(-1); } catch (FileNotFoundException e) { e.printStackTrace(); System.exit(-1); } catch (IOException e) { e.printStackTrace(); System.exit(-1); } System.out.println("gui ctor"); Program.initGnomeUI(PROGRAM_NAME, PROGRAM_VERSION,null); Gtk.main(); } /* * Listeners */ public void on_about1_activate() { String documenters[] = new String[1]; documenters[0] ="Rafael Ferreira"; About about = new About("Jyum","0.1","GPL","The Java yum interface",documenters, documenters , null ,null); about.show(); } public static void main(String[] args) { } } * All that I'm doing is a new JymGui(); call in another file... any ideas?? thanks, - Rafael |
From: Nicholas R. <ni...@mn...> - 2005-01-19 12:22:21
|
I'm not sure, but you might try moving the Program.init call before the try/catch block (i.e. before calling "new LibGlade"). nick On Wed, 2005-01-19 at 00:17 -0700, Rafael Ferreira wrote: > Hey everyone, > > sorry if this a stupid question but I get this crazy error: > > (process:8475): GLib-GObject-CRITICAL **: gtype.c:2253: initialization > assertion failed, use g_type_init() prior to this function > > (process:8475): GLib-GObject-CRITICAL **: file gobject.c: line 819 > (g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed > > (process:8475): GLib-GObject-CRITICAL **: file gobject.c: line 1579 > (g_object_unref): assertion `G_IS_OBJECT (object)' failed > org.gnu.glade.GladeXMLException: file glade-xml.c: line 180 > (glade_xml_construct): assertion `self != NULL' failed > at org.gnu.glade.LibGlade.glade_xml_new(Native Method) > at org.gnu.glade.LibGlade.<init>(LibGlade.java:93) > at org.ophion.jyum.JyumGui.<init>(JyumGui.java:36) > at org.ophion.jyum.Jyum.main(Jyum.java:22) > > whenever I instanciate a new object of the type below: > > public final class JyumGui { > > private LibGlade gladexml; > private final String XML = "/home/rafael/dev/Jyum/glade/gyum.glade"; > private final String XML_ROOT = "Jyum"; > private static final String PROGRAM_NAME="Jyum"; > private static final String PROGRAM_VERSION = "0.001"; > > /* > * Constructor > */ > public JyumGui() { > > try { > gladexml = new LibGlade(XML,this,XML_ROOT); > > } catch (GladeXMLException e) > { > e.printStackTrace(); > System.exit(-1); > } catch (FileNotFoundException e) { > e.printStackTrace(); System.exit(-1); > } catch (IOException e) { > e.printStackTrace(); > System.exit(-1); > } > System.out.println("gui ctor"); > > Program.initGnomeUI(PROGRAM_NAME, PROGRAM_VERSION,null); > Gtk.main(); > } > > > /* > * Listeners > */ > public void on_about1_activate() > { > String documenters[] = new String[1]; > documenters[0] ="Rafael Ferreira"; > > About about = new About("Jyum","0.1","GPL","The Java yum > interface",documenters, documenters , null ,null); > about.show(); > } > > public static void main(String[] args) { > } > } > > * All that I'm doing is a new JymGui(); call in another file... any > ideas?? > > thanks, > > - Rafael > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |
From: Joao V. <jvi...@ya...> - 2005-01-19 13:20:23
|
I've made a backport of libgnome-2.8.2 to run on Gnome 2.6. Basically what i did was to remove all 2.8-specific calls (which strangenly weren't many: just 2), and compile it on Gnome 2.6. It compiled fine, and i ran a gnome HelloWorld just fine. But, we can't make this official because we don't know exactly how good this backport is, if there's some problem, etc. *So*, here's what i'm doing: i'm making the backport avaliable to allow people to test it. I've packaged it with autopackage, you may download it here: http://www.angelfire.com/linux/jvic/libgnome-java-2.8.2.x86.package To install: * Download (you may have to 'right click->Save link...') * Make it executable * Double-click it, it will install it. To see the files installed: $ package files libgnome-java I have also made a patch avaliable, for the ones who want to build it, or to see what were the changes. Here's the patch: http://www.angelfire.com/linux/jvic/libgnomebackport.patch That's basically that; please test and send feedback. Oh, if you're wondering why i've backported it: i believe there's still many people on Gnome 2.6, and i'd like to make Java-Gnome avaliable for this people too. Mdk, for example, is still on Gnome 2.6 and will be till July probably. And even when it releases a new version, many ppl won't upgrade immediately. There's also a lot of ppl still using Fedora 2. So, that was the reason, basically. Cheers! J.V. _______________________________________________________ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis |