Closed InfiniteRegression closed 7 years ago
iterNext is part of the TreeModel interface which both the treestore and the liststore implement.
You should be able to call: yourListStore.iterNext(yourIter);
.
Thanks, I thought I tried that but I guess not, I remember even searching for it ;/ Guess I was looking in the wrong place.
Another thing: I am trying to use selectionForeach and it mixes GtkD with Gtk. I'm having to do a lot of prep work to get it to work like creating the GtkD types that wrap the Gtk ones:
index.selectedForeach((model, path, iter, data) { auto tm = new TreeModel(model); auto vl = new GValue(); tm.customTreeModelGetValue(model, iter, 0, vl); }
I can't seem to get the value directly from the tm. I looked at stuff like tm.getString but nothing, closest was the above.
Am I doing it wrong?
All the functionality of the TreeModel interface is mixed in, so you should be able to use getValueString:
index.selectedForeach((model, path, iter, data)
{
auto tm = new TreeModel(model);
auto i = new TreeIter(iter);
string s = tm.getValueString(i, 0)
}
Tough the mix of Gtk and GtkD for callbacks should be fixed at some point.
Would like to iterate through a liststore but there seems to be no iter_next:
see
https://www.linuxquestions.org/questions/programming-9/gtk-liststore-python-retrieving-the-list-values-506215/