GTK_IS_WIDGET Errors



Hello all.  I recently got an itch to update GCC from
2.9.5 to 3.2.2.  In doing so I have ran across a few
problems.  After changing over from the deprecated
headers I got my program to compile fine, however when
executing it an entry box causes these errors msgs:

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

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

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

and some more just like these.  These error msgs
appear right after the program is executed without any
user interaction.  All that is done is the main is
executed and a window is drawn.  Non of the other
widgets in the window complain, I have some pixmaps, a
scrolledwindow, a clist, two buttons, and some boxes. 
I did not touch the functions that the creating of the
window resides in.   In addition, I randomly get the
same errors when I open other windows from a double
click on the clist and or close them after they are
created.  Anyone have any ideas?  I thought it MAY
have been some linking/out-of-date deps/libs so I
downloaded newer versions of pango/atk/glib and
compiled them with the new GCC however that has not
helped.  If anyone has some ideas please share.

Here is a snippet of code where I create the entry box
that gives me an error everytime:

entry1 = gtk_entry_new_with_max_length(15);
//This is a function that I made to check if the var
is in fact a widget
//It returns GTK_IS_WIDGET()
std::cout << isWidget(entry1);
gtk_widget_ref (entry1);
gtk_object_set_data_full (GTK_OBJECT (window1),
"entry1", entry1,  
                            (GtkDestroyNotify)
gtk_widget_unref);
gtk_widget_set_usize (entry1, 75, 0);
gtk_box_pack_start (GTK_BOX (hbox2), entry1, TRUE,
TRUE, 0);
gtk_entry_set_text (GTK_ENTRY (entry1), ("Enter IP"));
gtk_widget_show (entry1);


Again, this code always gives the error, when its
commented out the error disappears and so does the
entry box! =)   Also I get spuratic similar errors for
other windows once created through user interaction.


Thanks guys,
David Swiston

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



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