Re: warning about invalid tree model iterators

Tim Janik wrote:

did you, or anyone else for that matter, investigate yet whether it'd be worth
keeping the warnings for *some* of the functions?

I did go through the list, and all the warnings may or may not be bogus depending
on situation.

gtk_tree_model_get_iter_from_string may look suspicious, since it deals with
a string, and everybody knows strings explode. But, e.g.,
gtk_tree_model_get_iter_from_string (model, &iter, "1");

may be used as a shortcut for

path = gtk_tree_path_new_from_indices (1, -1); gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_path_free (path);

This might be a good use in C++, where you can deal with strings without worrying about allocating/freeing, but you do need to free allocated GtkTreePath. (There are real world C++ projects using GTK which do *not* use gtkmm).

Best regards,

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