Re: Check an empty Gtk::TreeIter?
- From: "Andrew E. Makeev" <andrew solvo ru>
- To: Phong Cao <phngcv gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Check an empty Gtk::TreeIter?
- Date: Thu, 03 Nov 2011 10:50:40 +0400
just test iterator on boolean value:
void Base::checkEmptyIter()
{
if( !iter )
{
std::cout << "iterator is empty (invalid)" << std::endl;
}
}
В Срд, 02/11/2011 в 23:33 -0400, Phong Cao пишет:
> Hello everybody,
>
> I am current stuck with how to check an empty, uninitialized
> Gtk::TreeIter. I have checked out the documentation for Gtk::TreeIter,
> Gtk::TreePath & Gtk::TreeModel & have not found any function for
> checking an empty Gtk::TreeIter. Here is what I did, but it was not
> compiled:
>
> #include <iostream>
>
> class Base {
> public:
> Base();
> virtual ~Base();
>
> void checkEmptyIter();
>
> private:
> Gtk::TreeModel::iterator iter;
> };
>
> Base::Base() {
> //the treeiter is not initialized to make sure it is empty
> }
>
> Base::~Base() {
> }
>
> void Base::checkEmptyIter() {
> if (iter == NULL) { //can't
> compile
> std::cout << "d_iter is empty" << std::endl;
> }
> }
>
> Does anybody know anyway to check if a Gtk::TreeIter is empty?
>
> Thank you for reading my message and I hope you guys have a good week!
>
> --
> Phong V. Cao
> phngcv gmail com
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
--
Andrew E. Makeev <andrew solvo ru>
Solvo Logistic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]