Re: GtkClist / find_row_from_data

From: Date: Mon, 15 Apr 2002 06:11:05 +0000
Subject: Re: GtkClist / find_row_from_data
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1786@lists.php.net to get a copy of this message
According to GTK+, the find_row_from_data method of GtkCList is for returning a pointer that you had previously stored against the row using set_row_data. The idea is that you can keep a pointer to an array against each row, so as to fetch it again later. So Hakan's code is using find_row_from_data incorrectly. GtkCList doesn't provide a way to find rows using a data key, the coder is responsible for managing that themselves. While you could iterate through the whole list, it is much more efficient to maintain an array of entries added to the list. Alan's comment about set_row_data and get_row_data shows that the methods retain their GTK+ purpose, of storing a per row pointer. Though I must admit I expected that the get_row_data would take a row number and return the pointer. -- James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/

« previous php.gtk.general (#1786) next »