Re: Writable array returned from gtk_tree_path_get_indices()



On Thu, 2010-10-07 at 09:18 -0500, Stef Walter wrote:
> Is the integer array returned from gtk_tree_path_get_indices() writable
> by design? Or should it be treated as readonly?

It depends.

Sometimes you get a GtkTreePath from the treeview API when you ask for
something (e.g. gtk_icon_view_get_path_at_pos()).  Since that is a
newly-generated path that you own, you can do anything you want with it.
People may use it as a counter and increment the index to iterate over
the model, or whatever.

Sometimes you get the GtkTreePath as an argument to a callback (e.g.
GtkTreeModelForeachFunc).  Generally you shouldn't modify the path in
that case.

  Federico



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