Re: GtkTreeModelSort



On Mon, 2002-01-21 at 09:27, Havoc Pennington wrote:

Stuart Jansen <smj8 email byu edu> writes: 
Let me see if I've got this right:
Because there is no way to access the data once it is put into a
GtkListStore or GtkTreeStore, a seperate copy must be maintained. Like
in gtk-demo were editable values are stored ina a GArray. (Can I just
say that not being able to read the stored values is a _real_ pain?)

Oh come on, no one designed something that braindamaged. ;-)

gtk_tree_model_get().

As I (re)discovered an hour after sending this message. I'm not used to
C code supporting inheritance, but I've really been learning as I've
read the gtk+ source code the last few days.
 
I'm doing that and can edit/add rows without a problem. I'm having real
trouble removing rows, however. Could someone give at least a generally
description or better (bless your heart) example code describing the
correct way to use a GtkTreeModelSort?

I'm pretty sure either gtk-demo or tests/* in the GTK tarball has an
example.

Actually, no. treestoretest claimed to show how to remove rows in a
GtkTreeModelSort, but it didn't actually work. I've fixed that and will
submit a patch to gtk-devel in a few minutes.

I actually came up with the the right solution last night, but every
time I tried converting the GtkTreeModelSort iter to a child_iter my
program crashed. This lead me to beleive I was doing something wrong
even though I wasn't. When I grabbed the code in CVS the problem went
away. (I'd been using the RPMS at gtk.org.) When will the next set of
RPMS be released?


-- 
Stuart Jansen                   /"\    ASCII Ribbon Campaign
passageira {remove}bigfoot com  \ /    No HTML/RTF in email
                                 X     No Word docs in email
                                / \    Respect for open standards



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