[Sugar-devel] Help with olpcgames mainloop
World Class Project- Dev Team
develop at worldclassproject.org.uk
Sun Jun 6 15:54:12 EDT 2010
I extended my code from a tutorial but I think the problem was that I because I
have many games in one activity, there was some loop termination problems.
Olpcgames is a really good wrapper but I think I had a loop terminating where it
shouldn't have done. It was probably due to my game logic, so I stuck to
On 06 June 2010 at 21:42 Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
> On Sun, Jun 6, 2010 at 02:57, World Class Project- Dev Team
> <develop at worldclassproject.org.uk> wrote:
> > Hi
> > I have managed to fix most of my bugs for my new game, but please could
> > someone
> > help me with this?
> > I am using olpcgames wrapper.
> > 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
> > And the main loop is in GameController.py , I cannot for the life of me
> > figure
> > out where this exception is being raised in my code. I have no idea whats
> > being
> > called outside the mainloop. Please could any one offer any insight?
> I have never used pygame, but by looking at that backtrace I would
> dare to say that olpcgames assumes that when _start is called your app
> will be running the gtk+ event loop, which it may quit then run its
> own kind of event loop.
> Have you tried the pygtk tutorial? It may help you with some of the
> basic concepts and terminology even if you mainly want to use pygames.
> > Thanks in advance.
> > _______________________________________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel