AbstractTreeModel, AbstractListModel
- From: Joel Becker <jlbec evilplan org>
- To: gtk-devel-list gnome org
- Subject: AbstractTreeModel, AbstractListModel
- Date: Mon, 16 Jul 2001 21:36:01 +0100
Folks,
I was poking at the TreeView code today, and I saw that the
implementation of the models is not quite trivial. I have recently
gotten used to the ease of implementing the AbstractTreeModel and
AbstratTableModel interfaces in Swing, and I was wondering if there was
any such plan for GTK+.
Basically, I was looking a TreeView displaying an XML tree. In
the current available code, I have to build a TreeStore, populate it
with the tags, and then for every XML change I have to wrapper like:
add_child()
{
xmlAddChild(parent, child);
treeViewAddChild(itr, child->name);
}
or the like. In Java, I just add to the XML, and because I've built a
Model based on the XML as the backend, the view is happpily up to date.
I looked at GtkTreeStore, and judging by that, implementing all
of the given interfaces is a lot of work. Am I wrong in this?
Just curious.
Joel
--
"You cannot bring about prosperity by discouraging thrift. You cannot
strengthen the weak by weakening the strong. You cannot help the wage earner by
pulling down the wage payer. You cannot further the brotherhood of man by
encouraging class hatred. You cannot help the poor by destroying the rich. You
cannot build character and courage by taking away a man's initiative and
independence. You cannot help men permanently by doing for them what they could
and should do for themselves." --Abraham Lincoln
http://www.jlbec.org/
jlbec evilplan org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]