Re: changing a combo's popdown strings from select-list callback?



[ my popdown woes elided ]

    Cosmin> I have the same problem when changing the popdown strings (in
    Cosmin> Gtk C ) even if I change it when it's not popped down. The
    Cosmin> problem appears when I use the arrows keys to parse the popdown
    Cosmin> strings; a Gtk warning message is displayed and after 4-5 steps
    Cosmin> a segmentation fault occurs.  The warning message is:

    Cosmin> Gtk-CRITICAL **: file gtkcontainer.c: line 1209
    Cosmin> (gtk_container_set_focus_child): assertion `GTK_IS_WIDGET
    Cosmin> (widget)' failed.

    Cosmin> Attached is an example (in "interface.c" is my code).

If you set a gdb breakpoint in g_log and pop up one level, what is widget?
Perhaps you got ahold of the widget before setting the popdown strings, then
forgot to update that reference, so now it points at garbage?

-- 
Skip Montanaro (skip pobox com)
http://www.mojam.com/
http://www.musi-cal.com/



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