Daniel Hughes <[email protected]> wrote:

> I am playing around with clutter and am using if from c#.
> 
> Because the c# bindings are in a poor state I am having to create my
> own bindings as I go.
> 
> clutter_actor_animate is a hard call to interop because it has a
> variable number of arguments (something not supported in c#).

Are you literally binding the clutter_actor_animate function? That's not
recommended. I think the idea is that bindings would bind the
clutter_actor_animatev function instead which does not take a variable
number of arguments. clutter_actor_animate is intended as the C
'binding' for clutter_actor_animatev which just provides a convenient
interface. Other languages are expected to bind clutter_actor_animatev
separately using whatever method makes sense. For example, the Ruby
bindings take a hash as the last argument which it then converts into
two separate arrays (one for the property names and one for the values)
to pass to clutter_actor_animatev. Calling it from Ruby then looks like
this:

 some_actor.animate(Clutter::LINEAR, 1000,
                    "x" => 100,
                    "y" => 100)

Maybe if C# supports array literals or hash literals it could do
something similar.

> However I have something which I think will work, (based on the
> example code I have seen).
> 
> But when I try to use it I am getting the following assertion.
> 
> [clutter] clutter_actor_animate: assertion `duration > 0' failed
> 
> I have debugged it and checked that I am passing a value for duration
> which is valid ( greater then zero).
> 
> So before I spend a lot of time trying to debug the interop I wanted
> to check that their was not a known issue with the
> clutter_actor_animate function.

I don't think there are any known problems with the duration. You may
want to try posting a code snippet of your binding and someone with
knowledge of C# may be able to help.

Regards,
- Neil
-- 
To unsubscribe send a mail to [email protected]

Reply via email to