Re: an easy one...ctree question

From: Date: Mon, 14 May 2001 16:59:48 +0000
Subject: Re: an easy one...ctree question
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-1832@lists.php.net to get a copy of this message
Rich, hi - You've defined $sibling using $sibling, won't that hurt it? (Is this a brand new form of sibling rivalry?) ----- Original Message ----- From: "Rich Payne" <rdp@talisman.alphalinux.org> To: <php-gtk@lists.php.net> Sent: Monday, May 14, 2001 4:22 PM Subject: [PHP-GTK] an easy one...ctree question OK, so after my last problem this should be an easy one :) Can anyone tell me what I'm doing wrong, the node_get_text fails on the 1st column, but return the correct value if I click on the same row, but the 2nd column. (the error for the 1st is:<b>Warning</b>: node_get_text() cannot get text value in <b>test.php</b> on line <b>24</b>) here's a code snippet: function item_selected($tree,$nodeB,$col) { $text=$tree->node_get_text($node,$col); echo "Value is: ".$text." \n"; } $win = &new GtkWindow(); $folder_tree = &new GtkCTree(2,0,array("Name","Total")); $win->add($folder_tree); $folder_tree->freeze(); $parent=$folder_tree->insert_node(null,null,array("Test1",""),5,null,null,null,null,false,true); for ($i=0;$i<10;$i++) { $text=array($i,$i+10); $sibling=$folder_tree->insert_node($parent,$sibling,$text,5,null,null,null,null,true,false); } $folder_tree->connect('tree_select_row',item_selected); $folder_tree->thaw(); $win->show_all(); tia, --rdp -- Rich Payne rpayne@alphalinux.org www.alphalinux.org -- PHP GTK Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net For additional commands, e-mail: php-gtk-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.gtk (#1832) next »