Re: liststore get iter of latest element

It works, thank you very much.

On Fri, May 25, 2012 at 11:44 AM, Krzesimir Nowak <qdlacz gmail com> wrote:
2012/5/25 Giuseppe Penone <giuspen gmail com>:
> Hi,
> while it's trivial to get the first element of a list
> tree_iter = r_liststore->children().begin();
> I still found no way to retrieve the latest element without iterating all
> over the list.
> Getting r_liststore->children().end() doesn't provide a valid iter.
> Does anybody know how to obtain the result more easily?

If result of children() call is some STL container then you can call
rbegin() on it:
tree_iter = r_liststore->children().rbegin();

> Thanks and best regards,
> Giuseppe.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org

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