Re: Two warnings when creating a TreeStore



On Tue, 2007-09-11 at 16:21 -0400, Jos�lburquerque wrote:
> Hi all.  I'm working on my first (though not as easy as I thought) 
> project.  :-)  For what I'm doing I'm using a TreeView and a 
> corresponding TreeStore model.  I posted on this before in a thread 
> called "Displaying a 'hierarchy' of classes in a TreeView", but I've 
> moved further along (thank you Aaron for the link you sent me it was 
> very helpful!) and I'm sort of stuck on some warnings I'm now getting.
> 
> I get the warnings after I create the TreeStore using a single column 
> TreeModelColumnRecord class that looks like the following:
> 
>     class Columns : public TreeModelColumnRecord {
>     public:
>         Columns()
>             { add(element); }
>         TreeModelColumn<Element> element;
>     };
> 
>     Columns columns;
> 
> These are the warnings I'm getting (I haven't added any rows to the 
> TreeStore yet):
> 
> (process:19528): GLib-GObject-CRITICAL **: 
> /build/buildd/glib2.0-2.14.0/gobject/gtype.c:2242: initialization 
> assertion failed, use IA__g_type_init() prior to this function

You shouldn't ever try to use global instances of Gtkmm objects. All
gtkmm objects need be created after the Gtkmm type system has been
initialized, which is done inside Gtk::init().

Either use a pointer or make it a member.

--p





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]