Re: ali:6128): Gtk-CRITICAL **: gtk_widget_set_events: assertion `!GTK_WIDGET_REALIZ



On 1/30/06, Faqeer ALI <faqeerali hotmail com> wrote:
...
> gtk_widget_set_events (Button[j][i],
> GDK_EXPOSURE_MASK|GDK_BUTTON_PRESS_MASK);
...
> ////////////////////////////Warnings in my code/////////////////////
> (ali:6128): Gtk-CRITICAL **: gtk_widget_set_events: assertion
> `!GTK_WIDGET_REALIZED (widget)' failed
...

You have to use gtk_widget_add_events() instead of
gtk_widget_set_events() in this case (widget is realized at the moment
you call gtk_widget_set_events()).

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-add-events
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-set-events

Olexiy


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