From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16266.45995.39355.140798 at akasha.ijm.jussieu.fr> Date: Mon, 13 Oct 2003 16:16:11 +0200 To: Richard Jones Cc: lablgtk at kaba.or.jp Subject: Re: Bug when changing the contents of a frame In-Reply-To: <20031013133019.GA26162 at redhat.com> References: <20031013133019.GA26162 at redhat.com> Richard Jones [Monday 13 October 2003] : > Fatal error: exception Glib.Critical("Gtk", "file gtkcontainer.c: > line 984 (gtk_container_remove): assertion `widget->parent == > GTK_WIDGET (container)' failed") that means you're calling some_container#remove some_widget but the parent of some_widget is not some_container. Indeed, in your code, the value returned by show 2 and stored in the reference is a GMisc.label contained in a vbox. show 2 should return the vbox, not the last widget added to it. BTW, since a GtkFrame is a GtkBin, it can only contain one widget. So your code could be simplified ; you can drop the reference cell and define remove that way : let remove () = frame#remove (List.hd frame#children) -- Olivier