Re: Error deleting widgets: assertion `GTK_IS_WIDGET (widget)' failed
- From: Owen Taylor <otaylor redhat com>
- To: Jacob Kolding <jacob omnia dk>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Error deleting widgets: assertion `GTK_IS_WIDGET (widget)' failed
- Date: Fri, 22 Aug 2003 13:00:15 -0400
On Fri, 2003-08-22 at 11:43, Jacob Kolding wrote:
Hello all
I have some problems deleting widgets. In this case:
GtkCellRenderer
GtkTreeViewColumn
GtkTreeModel
GtkTreeSelection
None of these are widgets.
The code looks like this:
gtk_widget_destroy((GtkWidget*)check_renderer);
and the error I get:
Gtk-CRITICAL **: file gtkwidget.c: line 1626 (gtk_widget_destroy):
assertion `GTK_IS_WIDGET (widget)' failed
Can anyone tell me what I'm doing wrong?
A GtkCellRenderer isn't a widget. Of the non-widget
objects you list above, most of them will be cleaned
up for you, there is no reason to destroy them explicitely.
(I have a feeling that you might be destroying a lot
more widgets than you need to ... generally destroying
a widget will destroy all that widgets children.)
For GtkTreeModel, you can use g_object_unref().
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]