Hi, I am having problems selecting a row in treeview.
I am using Pythoncard,
Glade 2 and Python 2.4. I am using the following code:- combo3 = self.wTree.get_widget("treeview1") model=gtk.TreeStore(gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING) self.hostsmodel = model combo3.set_model(model) combo3.connect("row_activated", self.callback53, combo3,model) def
callback53(self,data,combo3,data2,data3,model): view = gtk.TreeView(model) selection = view.get_selection().get_selected() print selection result = model.get_value(iter,0) print result I get the following error: (<gtk.TreeStore object (GtkTreeStore) at 0xb3cb70>, None) Traceback (most
recent call last): File
"C:\Documents and Settings\Johnc\Projects\project7\shopcall.py", line
1 , in callback53 result = model.get_value(iter,0) TypeError: iter must be a GtkTreeIter What do I need to assign to iter
to make this code work? Thanks, John. |
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor