Problems with g++ and gtk_widget_destroy() to destroy windows?!?!?!



Well, I've already been burned by the finer points of casting and GtkItemFactoryEntry callbacks. So I'm wondering if something similar is going on here. I use the following technique all over my code:

gtk_signal_connect_object(GTK_OBJECT(cancel_button), "clicked",
                             GTK_SIGNAL_FUNC(gtk_widget_destroy),
                             GTK_OBJECT(some_win));

but in a new section (written in C++) I get errors when I click the "cancel" button:

Gtk-CRITICAL **: file gtkwidget.c: line 1388 (gtk_widget_destroy): assertion `GTK_IS_WIDGET (widget)' failed.

So should I move the relevant sections of the code into a .c file? Or is there a better workaround?

Thanks,

DT

--
Technical Director - Virginia Center for Computer Music
http://www.virginia.edu/music/vccm.html





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