Re: [PATCH] fix broken api of Gtk2::TreeSelection->get_selected() [gtk2-perl regression]



On Sunday, July 6, 2003, at 01:25 PM, Thierry Vignaud wrote:

this patch fix the broken api of Gtk2::TreeSelection->get_selected()

unlike C and gtk2-perl APIs, Gtk2::TreeSelection->get_selected()
return its return values in the wrong order.

<F_gtk2-perl-xs-tree_sel.diff>
so it's both wrong and a regression from inline tree of gtk2-perl

after some discussion both on and off the list a while back, it was decided that the most common use for get_selected() was to find just the iter, and the ability to call the function in scalar context to retrieve that was considered more important than adhering strictly to the C API. the model is accessible in array context as well as through $selection->get_tree_view->get_model, and this change is documented in the Gtk2::api manpage.

we could compromise and have scalar context return the iter and array context return both in the C order, but i had trouble getting this to work and nobody seemed interested in it.

what does everybody think?




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