<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<title></title>
</head>
<body>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span>hi</span> Tomeu,</p>
<p style="margin: 0px;"> </p>
<p>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 gtk/cairo.</p>
<p> </p>
<p>Thanks</p>
<p>Dev</p>
<p> </p>
<div style="margin: 5px 0px 5px 0px; font-family: monospace;">
On 06 June 2010 at 21:42 Tomeu Vizoso <tomeu@sugarlabs.org> wrote:<br />
<br />
> On Sun, Jun 6, 2010 at 02:57, World Class Project- Dev Team<br />
> <develop@worldclassproject.org.uk> wrote:<br />
> > Hi<br />
> ><br />
> > I have managed to fix most of my bugs for my new game, but please could<br />
> > someone<br />
> > help me with this?<br />
> ><br />
> > I am using olpcgames wrapper.<br />
> ><br />
> > Exception in thread Thread-1:<br />
> > Traceback (most recent call last):<br />
> >   File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner<br />
> >     self.run()<br />
> >   File "/usr/lib/python2.6/threading.py", line 477, in run<br />
> >     self.__target(*self.__args, **self.__kwargs)<br />
> >   File<br />
> > "/usr/share/sugar/activities/FreeFromMalaria.activity/olpcgames/canvas.py",<br />
> > line<br />
> > 143, in _start<br />
> >     gtk.main_quit()<br />
> > RuntimeError: called outside of a mainloop<br />
> ><br />
> ><br />
> > The code is in git://git.sugarlabs.org/freefrommalaria/mainline.git<br />
> ><br />
> > And the main loop is in GameController.py , I cannot for the life of me<br />
> > figure<br />
> > out where this exception is being raised in my code. I have no idea whats<br />
> > being<br />
> > called outside the mainloop. Please could any one offer any insight?<br />
><br />
> I have never used pygame, but by looking at that backtrace I would<br />
> dare to say that olpcgames assumes that when _start is called your app<br />
> will be running the gtk+ event loop, which it may quit then run its<br />
> own kind of event loop.<br />
><br />
> Have you tried the pygtk tutorial? It may help you with some of the<br />
> basic concepts and terminology even if you mainly want to use pygames.<br />
><br />
> Regards,<br />
><br />
> Tomeu<br />
><br />
> > Thanks in advance.<br />
> ><br />
> ><br />
> ><br />
> ><br />
> > _______________________________________________<br />
> > Sugar-devel mailing list<br />
> > Sugar-devel@lists.sugarlabs.org<br />
> > http://lists.sugarlabs.org/listinfo/sugar-devel<br />
> ><br />
> ><br />
> _______________________________________________<br />
> Sugar-devel mailing list<br />
> Sugar-devel@lists.sugarlabs.org<br />
> http://lists.sugarlabs.org/listinfo/sugar-devel<br />
</div>
</body>
</html>