Hi all,

In the course of porting Gaphas, I ran into the same issue Timo described 
several months ago: somehow it is not possible to call timeout_add(1, f).

The same issue I see for GLib.idle_add.

I'm running Mac OS X 10.6.7
Python 2.6.1
pygobject 2.28.2
GLib 2.27.5
GTK+ 2.23.3

Any clues?

Regards,

Arjan

On 16 Oct 2010, at 14:20, Timo wrote:

> Hello,
> 
> Before porting my main project to PyGObject, I am writing a little 
> application first.
> The problem is that I get an error when calling GLib.timeout_add() and I 
> can't figure out what's wrong.
> 
> This is a minimal example:
> import pygtk
> pygtk.require('2.0')
> from gi.repository import Gtk, GLib
> 
> def update():
>     print "Update!"
>     return True
> 
> GLib.timeout_add(3000, update)
> 
> And the error message:
> ** (timeout_test.py:9304): CRITICAL **: g_arg_info_is_caller_allocates: 
> assertion `info != NULL' failed    # This repeats 5 times
> Traceback (most recent call last):
>   File "timeout_test.py", line 9, in <module>
>     GLib.timeout_add(3000, update)
>   File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/types.py", line 40, in 
> function
>     return info.invoke(*args)
> TypeError: Error invoking GLib.timeout_add: Invalid callback given for 
> argument function
> 
> 
> This running on Ubuntu 10.10 with Python 2.6.6 and PyGobject 2.21.5
> 
> Cheers,
> Timo
> 
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to