Re: Application crash but when I swap lines it works.



W dniu 12 marca 2012 16:14 użytkownik Łukasz Gąsiorek
<lukaszgpl gmail com> napisał:
> Hi!
> Code is here http://pastie.org/3578062
> Look at the lines 80, 81, 82 and 93.
> When I swap lines 81 and 82 app works. What is wrong?

I do wonder if declaring m_cols as 'const Columns' in ContactList is
not messing some things up. I mean - it probably should be non-const,
because referring to members of const instance makes the members also
const, that is - they are of type e.g. 'const
Gtk::TreeModelColumn<Glib::ustring>' instead of
'Gtk::TreeModelColumn<Glib::ustring>'. And this probably doing
something weird in line with 'row[m_cols.contact] = contact;' where
operator[] of row is some kind of templated function.

This is a wild guess I made after reading the code - I did not try to
compile it. I suppose that compiling with warning flags (like -Wall
and -Wextra) gives no clues, eh?

> Thanks
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>


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