On Wed, 7 Sep 2005 13:52:34 -0400 "Faria, Sydney C" <[EMAIL PROTECTED]> wrote:
> I made a GtkListStore model and populated it with data entries and view it > via a GtkTreeView no problem. Now I want to use a button click callback to > scan through the list > to access all the items to print them out. I found > gtk_tree_model_iter_next(model, iter) and gtk_tree_model_getvalue(model, > iter, column, value) and thought that might be the way to go: then I found > gtk_tree_model_foreach(model, GtkTreeModelForeachFunc, data) and > GtkTreeModelForeachFunc(model, PATH, iter, data)! The latter 2 methods look > like the easier path to follow but the documentation here is very sparse! > I'm trying to iterate through a list so what does PATH have to do with this? > I sure would like to see an example of these two techniques so any comments > and/or skeleton code would certainly be well appreciated. use gtk_tree_model_foreach (model, model_foreach, NULL); static gboolean model_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { gtk_tree_model_get (model, iter, COLUMN, &value, -1); return FALSE; } -- HuamiSoft Hubert Sokolowski http://www.huamisoft.com/ tel. 501456743 _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list