[pygtk] GtkCTree Doesn't Work

James Henstridge james@daa.com.au
Mon, 18 Sep 2000 16:18:08 +0800 (WST)

On Mon, 18 Sep 2000, Eric Gillespie, Jr. wrote:

> With Gnome-Python 1.0.53 from Debian unstable, i can't seem to
> attach any data to a row in a CTree. I don't know of any other
> way to find what the user selected. Even if i were to catch the
> selection signal, i would still have the same problem of mapping
> the node to useful data. Am i missing something obvious?
> Anyway, i've attached a small program demonstrating the problem.
> The error message i get is below.
> Traceback (innermost last):
>   File "hey.py", line 11, in ?
>     ctree.set_row_data(node, "hey")
>   File "/usr/lib/python1.5/site-packages/gtk.py", line 1278, in set_row_data
>     _gtk.gtk_clist_set_row_data(self._o, row, data)
> TypeError: illegal argument type for built-in operation

You should be using the node_set_row_data() method, rather than the clist
set_row_data() method.  This method takes a GtkCTreeNode rather than a row

I think this is probably covered in the gtk reference documentation.


Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/