I may as well add that one of the aims is to never (or at least hardly ever) spit out these gtk warnings. Many of the type checks that might spit out these warnings are already caught as exceptions (mainly type checks).
If you can track down where the warning occurs, please file a bug report (they generally indicate an error in the program which could cause a segfault if assertions were turned off in gtk). James. On Tue, 9 Oct 2001, Matt Wilson wrote: > The problem here is that some functions have void return values and > throw up g_log, or functions still succeed when a g_log is issued. > There isn't a clean cross platform way to know which python wrapper > caused a warning at any given time. Lets say two threads are calling > into functions around the same time. Unless we have a global g_log > lock on all the wrappers and checked the log after we made a call that > could g_log, there's no way to know that our call caused any logging > output... > > In other words, it just won't work. > > Matt > > On Tue, Oct 09, 2001 at 02:58:30PM -0500, Skip Montanaro wrote: > > (apologies if you get this twice. i'm having intermittent mail problems.) > > > > Gtk occasionally emits semi-useful error messages like (wrapped for reading > > convenience): > > > > draw.py (pid:29047): GRuntime-CRITICAL **: file gvalue.c: line 140 > > (g_value_unset): assertion `G_IS_VALUE (value)' failed > > > > It seems that g_log_set_handler allows you to establish error handlers for > > different error and warning classes. For PyGtk I think it might be more > > useful to raise exceptions than to emit these messages. g_log_set_handler > > looks like the key function. Unfortunately, I can't get to the glib docs at > > the moment to investigate this capability more. > > > > Has anyone investigated this already? > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
