RE: [gtkmm] adding and removing widgets to/from fixed container
- From: Murray Cumming Comneon com
- To: abas aix meng auth gr, ec142 york ac uk
- Cc: gtkmm-list gnome org
- Subject: RE: [gtkmm] adding and removing widgets to/from fixed container
- Date: Fri, 28 Mar 2003 08:38:14 +0100
> From: Anastasios Bassoukos [mailto:abas aix meng auth gr]
> > The troubles arise when I try to add again something that I
> had previously removed. In this case I get assertion fail and
> segmentation fault.
>
> That happens because Container::remove() unreferences the
> widgets. Nothing
> else references them, therefore they are destroyed.
This shouldn't be a problem unless you use Gtk::manage(). Actually, even if
you use Gtk::manage() it shouldn't be a problem - but it would take a
simple-as-possible test case to investigate it. People don't use Gtk::Fixed
so it might be a rare problem with just that container.
> Use Glib::RefPtr<Gtk::Widget> to keep track of them....
Glib::RefPtr<> is not really meant for Widgets.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]