Please: Explain what happens when on use gtk_container_remove



Hi

I do this (note the code is not in C as I use Ada 95, but it should be
understandable)

   Gtk.Container.Add (Some_Vbox, Some_Frame);
   Gtk.Container.Remove (Some_Vbox, Some_Frame);
   Gtk.Container.Add (Some_Vbox, Some_Frame);

As I understand the documentations the Remove should not alter the
Some_Frame widget, but at the second Add I get:

 Gtk-CRITICAL **: file gtkcontainer.c: line 714 (gtk_container_add):
 assertion `GTK_IS_WIDGET (widget)' failed.  

Why do I get this? And how can I Remove a widget from a container
temporarily while I Add a different widget to the container and then
Remove this to place back the first again? If you can show me this in C
or plain English I'll understand :-).

Thanks in advance.

System: Debian GNU/Linux with:

libgtk1.2      1.2.10-ximian. The GIMP Toolkit set of widgets for X
libgtk1.2-dev  1.2.10-ximian. Development files for the GIMP Toolkit
libglib1.2     1.2.10-ximian. The GLib library of C routines
libglib1.2-dev 1.2.10-ximian. Development files for GLib library
libgtkada1     1.2.11-2       Ada binding for the GTK library
libgtkada1-art 1.2.11-2       Ada binding for the art and pixbuf libraries
libgtkada1-dev 1.2.11-2       Development files for libgtkada
libgtkada1-gl  1.2.11-2       Ada binding for OpenGL
libgtkada1-gla 1.2.11-2       Ada binding for Glade generated applications
libgtkada1-gno 1.2.11-2       Ada binding for the Gnome Library

-- 
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
                 «For me, Ada95 puts back the joy in programming.»




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