> Anyone can answer my other question please? Why do I get such a critical
> warning message like the one below? Every time I start my code it dumps
> this, but I'm not sure it's an error or it's my fault - my app seems to work
> ok.. can I do anything to make this disappear?
> 
> Gtk-CRITICAL **: file gtkwidget.c: line 1584 (gtk_widget_map): assertion
> TK_WIDGET_VISIBLE (widget) == TRUE' failed.

Since nobody else is biting on this one I'll do my best.  All these
Gtk-CRITICAL messages tell you what assertion failed; it's worth
reading them carefully.  In this case my guess is that you're trying
to do something to a widget that should be show()n beforehand.
Anyway, whatever it is you're doing, it involves (at the C level)
calling gtk_widget_map.  (Which at the python level is the 'map'
method of an instance of any class with GtkWidget as an ancestor,
although you're probably not calling it directly).  That's as much as
the error tells you; it doesn't trace back into your python script so
I guess you'll need to single-step through your code to figure out
exactly which lines in your script are causing these.

So the answers to your questions are:
1. I can't really, but I'd like to pretend ;)
2. Because gtk doesn't like something you're doing.
3. It's probably an error on your part, and if you're determined
enough you can hunt it down and fix it.  (Better is to run your script
often during development so you can see immediately when these things
creep in; that's one of the major strengths of Python after all.)

Even if your script seems to work fine, failed assertions should be
regarded as serious -- folks don't tend to sprinkle these throughout
their code just for fun.  If there is no way you can rearrange your
code to make them go away, then you might start to wonder whether
pygtk or gtk itself is doing something out of order, or if the assert
is just logically bogus.  But my experience is that these
Gtk-CRITICALs just require some code shuffling to get rid of (though I
don't think I've seen that particular one before).  HTH...

-Rob

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to