Re: [Java-gnome-developer] big problems with glade
Brought to you by:
afcowie
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 |