On Thu, 2010-02-11 at 18:10 +0000, Matthew Hall wrote:
> Can someone help me animate a group? I have this code:
> 
>          clutter_actor_animate(&group1,
>                                CLUTTER_LINEAR,
>                                1000,
>                                'x', (float)200,
>                                'y', (float)100,
>                                "rotation-angle-z", (float)360,
>                                NULL);
> 
> but when I run it it says that group1 is not an actor. Removing the '&' 
> gives a segfault. Any help greatly appreciated,

how do you declare and create "group1"?

hint: if it looks like this:

  ClutterActor group1 = *clutter_group_new ();

then, as the damn kids today say, "you're doing it wrong".

it should be:

  ClutterActor *group = clutter_group_new ();

[note the pointer]

if this doesn't match, you should probably pastebin your code and point
us to it, because clutter_actor_animate() should not segfault.

also, using:

  "x", (float) 200,
  "y", (float) 200,

might not be enough for the variadic argument assignment - you might
want to try with:

  "x", 200.0f,
  "y", 200.0f

instead; a wrong type might lead to crashes as well, due to the fact
that variadic arguments in C are generally hard.

ciao,
 Emmanuele.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, Open Source Software Engineer
Intel Open Source Technology Center

-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com

Reply via email to