hi;

this is actually a python issue, not a clutter one.

On Wed, 2008-02-27 at 23:55 +0100, Luis de Bethencourt wrote:
> Hello,
> 
> I've been doing some clutter coding in python, and since the code is
> getting too big for one file and I want to have multiple behaviours in
> the app I decided to move the behaviour code to a separate class to
> then move it to a different file. But when I move the code out to an
> other class, it isn't working anymore:
> 
> http://rafb.net/p/WrcZ6Q20.html <-- works (without the class, all code
> in the same block)
> http://rafb.net/p/Wog62J10.html <-- doesn't work (with the class
> 
> You can run and test the code to see it for yourself. I can't spot the
> problem and I've double-checked everything.

apart from the fact that I seriously doubt your script works with
pyclutter 0.6.0 (the behaviours constructors have the parameters in the
wrong order and yet they are not using named arguments; you're using
clutter.stage_get_default() and clutter.texture_new_from_pixbuf() both
of which are deprecated), then you have this:

  timeline = clutter.Timeline(200, 25)
  timeline.set_loop(True)
 
  Slideshow(timeline, image)

which means: create a Slideshow class instance and then discard it,
garbage collecting all the stuff you did in the constructor; just save
the instance and it will all magically works - well, except that your
clutter code still needs to be fixed.

this version of your code works:

  http://rafb.net/p/mfZsTC17.html

(just change 'redhand.png' with your own file)

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, OpenedHand Ltd.
Unit R, Homesdale Business Centre
216-218 Homesdale Rd., Bromley - BR12QZ
http://www.o-hand.com

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to