Hi all, When using Ctree & trying to read text from the 0th row, pygtk generates an execption. However, if I access row 1 and above things work fine. I have data in row zero, so what's wrong? Here's the stack trace. I've included the test program. (select a row to see it crash.) [ezolt@pulitzer test]$ python hello.py Traceback (innermost last): File "/usr/lib/python1.5/site-packages/gtk.py", line 125, in __call__ ret = apply(self.func, a) File "hello.py", line 12, in on_epoch_tree_tree_select_row print tree.node_get_text(node, 0) File "/usr/lib/python1.5/site-packages/gtk.py", line 1412, in node_get_text return _gtk.gtk_ctree_node_get_text(self._o, node, col) ValueError: can't get text value Python Version: python-1.5.2-7 PyGtk version: pygtk-0.6.6 Gtk Version: gtk+-1.2.7-1 OS: Redhat Alpha/Linux 6.1 Thanks much, --Phil Compaq: High Performance Server Division/Benchmark Performance Engineering ---------------- Alpha, The Fastest Processor on Earth -------------------- [EMAIL PROTECTED] |C|O|M|P|A|Q| [EMAIL PROTECTED] ------------------- See the results at www.spec.org -----------------------
#!/usr/bin/env python from gtk import * def destroy(*args): window.hide() mainquit() def on_epoch_tree_tree_select_row(*args): tree = args[0] node = args[1] print tree.node_get_text(node, 0) pass window = GtkWindow(WINDOW_TOPLEVEL) window.connect("destroy", destroy) window.set_border_width(10) window.show() epoch_tree=GtkCTree(1) window.add(epoch_tree) epoch_tree.set_column_width(0, 80) epoch_tree.connect("tree_select_row", on_epoch_tree_tree_select_row, epoch_tree) epoch_tree.show() epoch_tree.insert_node(None, None, ["foo"], is_leaf = FALSE) mainloop()