Re: [gtkmm] Custom TreeStore Problems
- From: Thomas Muldowney <temas box5 net>
- To: GTKMM Mailing List <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Custom TreeStore Problems
- Date: 29 Apr 2003 09:41:03 -0500
I've recently battled through this myself and have defeated it! That's
to say I got something working. I'm not sure if it's 100% correct, but
it seems to be working great. The code is available in the Gabber2 CVS,
you can use viewcvs.cgi here:
http://www.jabberstudio.org/cgi-bin/viewcvs.cgi/gabber/src/
RosterModel.cc and .hh have the actual model implementation, and it's
used as the model for the treeview contained in RosterView.
I'd be more than happy to answer questions about what I did, or receive
any feedback about more correct ways to do things. Especially related
to the RosterModel_Class (Glib::Class). I'd also be willing to write up
a small tutorial with more simple code and implementation if the code
I've written is deemed mostly correct =)
--temas
On Mon, 2003-04-28 at 20:45, darco wrote:
> I am trying to implement a Custom TreeStore using GtkMM. Unable to
> find any documentation on how to do this, I figured I would just give
> it a shot and see if I could figure it out. But I have now come to a
> point where I am stumped. I'm not sure if I'm just missing something,
> or if it is a bug.
>
>
> Seeing as there is no example for creating a custom tree store in the
> GtkMM tarball, I wrote a small program that (if it worked) would
> demonstrate how to do this. After if is fixed and working, it might be
> helpful if it were included into the tarball (or perhaps elsewhere)
> for others to examine.
>
>
> Right now, I'm getting the following runtime errors:
>
>
> <fixed><fontfamily><param>Courier New</param><bigger>(customtreestore:343):
> glibmm-CRITICAL **: file interface.cc: line 53
> (Glib::Interface::Interface(const Glib::Interface_Class&)): assertion
> `gobject_ != 0' failed
>
>
> (customtreestore:343): glibmm-CRITICAL **: file interface.cc: line 53
> (Glib::Interface::Interface(const Glib::Interface_Class&)): assertion
> `gobject_ != 0' failed
>
>
> (customtreestore:343): glibmm-CRITICAL **: file interface.cc: line 53
> (Glib::Interface::Interface(const Glib::Interface_Class&)): assertion
> `gobject_ != 0' failed
>
>
> (customtreestore:343): glibmm-CRITICAL **: file interface.cc: line 53
> (Glib::Interface::Interface(const Glib::Interface_Class&)): assertion
> `gobject_ != 0' failed
>
>
> (customtreestore:343): GLib-GObject-CRITICAL **: file gobject.c: line
> 1319 (g_object_ref): assertion `G_IS_OBJECT (object)' failed
>
>
> (customtreestore:343): GLib-GObject-CRITICAL **: file gobject.c: line
> 1337 (g_object_unref): assertion `G_IS_OBJECT (object)' failed
>
>
> (customtreestore:343): GLib-GObject-CRITICAL **: file gobject.c: line
> 1337 (g_object_unref): assertion `G_IS_OBJECT (object)' failed
>
> </bigger></fontfamily></fixed>
>
> Oddly enough, several of these errors appear when I am copying the
> Glib::RefPtr<<> for the CustomTreeStore! I find this to be most
> bizzare. NONE of the virtual functions are being called, and I don't
> know why. Is it possible that I'm not using the Glib::RefPtr<<>
> correctly?
>
>
> I saw that someone earlier mentioned having similar problems and
> Murray suggested the following:
>
> <excerpt>I suspect that a custom Store might require similar
> techniques as a custom CellRenderer, because it might require the
> definition of a new GObject type at runtime. You should probably look
> at the constructors in the custom cellrenderer example.
>
> </excerpt>
>
> I just wanted to say that I am doing this, and the program still
> yields the results shown above.
>
>
> The source code to this example can be found here:
>
> ftp://ftp.voria.net/pub/customtreestore.tar.gz (Or if you prefer http,
> use http://ftp.voria.net/pub/customtreestore.tar.gz )
>
>
> Thanks in advance!
>
>
> --- darco
>
> http://www.deepdarc.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]