On Wed, 31 May 2000, Phillip Ezolt wrote:

> 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

You shouldn't access the tree column of the CTree with gettext.  Instead,
use the get_node_info(node) method to get info about the tree column.

> 
> Thanks much,
> --Phil
> 

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to