[Sugar-devel] [sugar] Canvas

Gloria Meneses gpmeneses at gmail.com
Tue Dec 9 23:02:55 EST 2008


Hi guys.

On Tue, Dec 9, 2008 at 4:32 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:

> Sorry Gloria,
>
> but doesn't seem to be around here many people with experience with
> olpcgames.
>
> Did you managed to solve this issue?


Yes, I did it. Wade helped me. I'm sorry guys, I had to reply you about the
solution but I am trying to finish the activity and I forgot it.

>
>
> How is your activity different from the other activities that use
> olpcgames?


Well, I am making an activity based on JingSawPuzzle game. I found this game
in the olpcgames site. It was perfect for my activity, so I used the source
code. I know there is an JingSawPuzzle activity for XO but it has less
elements than the original one, and these elements are necessaries for my
activity

I had problems with some parameters, Wade reviewed my source code and told
me about that. I fixed the mistake and I found several ones, but I fixed
each one. Now I am adding New functionality and sugarizing :)

>
>
> Regards,


Thanks

>
>
> Tomeu
>
> On Sun, Nov 30, 2008 at 5:23 PM, Gloria Meneses <gpmeneses at gmail.com>
> wrote:
> >
> > Hello people
> >
> > I have a problem using canvas.
> > olpcgames canvas has 2 arguments: width and height. In my activity class
> I
> > call canvas in this way:
> >
> > self.canvas = olpcgames.canvas(1200, 750)
> >
> > but I have this problem:
> >
> > olpcgames.canvas: Uncaught top-level exception: Traceback (most recent
> call
> > last):
> >   File
> "/home/monyu/Activities/StoryBuilder.activity/olpcgames/canvas.py",
> > line 116, in _start
> >     fn()
> > TypeError: __init__() takes exactly 2 arguments (1 given)
> >
> > Exception in thread Thread-1:
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
> >     self.run()
> >   File "/usr/lib/python2.5/threading.py", line 446, in run
> >     self.__target(*self.__args, **self.__kwargs)
> >   File
> "/home/monyu/Activities/StoryBuilder.activity/olpcgames/canvas.py",
> > line 124, in _start
> >     gtk.main_quit()
> > RuntimeError: called outside of a mainloop
> >
> >
> > I reviewed several olpcgames activities but I don't understand how to
> show
> > the content of my game into the canvas, so I was following the Activity
> > tutorial but I got the same log.
> >
> > reviewed the olpcgames canvas source code and the method connect_game is
> > looking for the name of activity main loop, but I don't know how to set
> it
> > on.
> >
> > if ':' not in app:
> >  app += ':main'
> >  mod_name, fn_name = app.split(':')
> >  mod = __import__(mod_name, globals(), locals(), [])
> >  fn = getattr(mod, fn_name)
> >
> > any hints
> > Thanks
> > --
> > --------------------------------------------
> > + Software Libre en Colombia
> > http://el-directorio.org
> >
> > + OLPC Colombia
> > http://wiki.laptop.org/go/OLPC_Colombia
> >
> > + Mujeres en el software libre
> > http://www.chicaslinux.org
> >
> > _______________________________________________
> > Sugar mailing list
> > Sugar at lists.laptop.org
> > http://lists.laptop.org/listinfo/sugar
> >
> >
>



-- 
--------------------------------------------
+ Software Libre en Colombia
http://el-directorio.org

+ OLPC Colombia
http://wiki.laptop.org/go/OLPC_Colombia

+ Mujeres en el software libre
http://www.chicaslinux.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20081209/0b225c76/attachment-0001.htm 


More information about the Sugar-devel mailing list