Re: Three path question



On Thursday 27 May 2004 16:37, Dan Korostelev wrote:

Why gtk_tree_path_next is void (I can't check if path was moved or not),
while gtk_tree_path_prev (for instance) is gboolean? Is this a bug?

It's not a bug, it's a feature ;-)

Tree paths do not refer to really existing rows in a particular model (as tree 
iters do), but just describe the position of a row in a tree from the root. 
So you can construct tree paths of rows that do not exist.

Under normal circumstances, gtk_tree_path_next() will never fail, that's why 
it doesn't return anything. gtk_tree_path_prev() on the other hand will fail 
if it is already set to the first node, that's why it returns a boolean to 
indicate that (to make it easier to use in loops and the like I presume).

Cheers
 -Tim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]