[gcompris-devel] bug?

Bruno Coudoin bruno.coudoin at free.fr
Wed Dec 17 15:52:01 UTC 2003


Le mer 17/12/2003 à 23:01, José JORGE a écrit :
> this python code crashes gcompris :
> 
> self.solution = [4,2,3,1]
> for a in self.solution[:]:

you can say more simply for a in self.solution[]

>       gcompris.sound.play_ogg("melody/son"+str(a))

Sounds fine

>       gcompris.utils.set_image_focus("self.son"+str(a)+"_item",1)
>     
Here is the mistake. you need to give the canvasitem that holds the
image, not a pixmap filename.
RTFM:
http://cvs.gnome.org/lxr/source/gcompris/docs/C/python.html#id2788028

> I must say that I'm trying to show what item's sound is being played.
> 

Hehe, hope with this you are done ;)

Bruno.






More information about the Gcompris-devel mailing list