Re: [gtkmm] Problems with TreeModelFilter



> I have some problems with trying to use TreeModelFilter in my app. I
> created a liststore and then Tried create new TreemodelFilter like this:
>
> Gtk::TreeModel::Path path( "0" );
> gArtistsFilter->create( gTracksModel, path );
>
> All I got was a warning when I ran my app.
>
> glibmm-WARNING **: Glib::ConstructParams::ConstructParams(): object
> class `gtkmm__GtkTreeModelFilter' has no property named `root'

Ah, I guess you are the first to test this.

The Gtk::TreeModelFilter constructor needs to do the same as
gtk_tree_model_filter_new(). Normally those _new() functions should just
pass the parameters to g_object_new(), but this one does some extra stuff
that we can't do from outide.

I think this will need an API addition in GTK+, to add a _construct()
function, so it's unlikely that this will be working in gtkmm until gtkmm
2.5/2.6. I will work on that. For now, you could try using the C functions
directly, with gobj() and Glib::wrap().

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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