[Sugar-devel] Help with olpcgames mainloop

World Class Project- Dev Team develop at worldclassproject.org.uk
Sun Jun 6 15:38:44 EDT 2010


Hi Sascha
 
Yes I think you're right, my activity was probably  to complex for pygame. I
re-factored all my code to use pygtk/cairo instead, it's a little bit slower but
it all seems to work, I've uploaded the new version.
 
http://activities.sugarlabs.org/en-US/sugar/addon/4309
 
Thanks

 

On 06 June 2010 at 09:19 Sascha Silbe <sascha-ml-ui-sugar-devel at silbe.org>
wrote:

> > Exception in thread Thread-1:
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
> >     self.run()
> >   File "/usr/lib/python2.6/threading.py", line 477, in run
> >     self.__target(*self.__args, **self.__kwargs)
> >   File
> > "/usr/share/sugar/activities/FreeFromMalaria.activity/olpcgames/canvas.py",
> > line
> > 143, in _start
> >     gtk.main_quit()
> > RuntimeError: called outside of a mainloop
> >  
> > The code is in git://git.sugarlabs.org/freefrommalaria/mainline.git
> My quick and wild guess is that olpcgames might not like you changing the
> main loop from within a running main loop (i.e. your change_game() and
> related functions).
>
> Sascha
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100606/311f6f26/attachment.htm 


More information about the Sugar-devel mailing list