Thank neil for the pointer I tried the suggested function but I get exactly the same Assertion.
Clutter-CRITICAL **: clutter_actor_animatev: assertion `duration > 0' failed (we except for the v) here is my code: public Animation Animate(ClutterAnimationMode mode, uint duration, string property1, float val1, string property2, float val2, string property3, float val3) { var values = new float[]{val1,val2,val3}; IntPtr pointer = GCHandle.Alloc(values,GCHandleType.Pinned).AddrOfPinnedObject(); Console.WriteLine(duration); IntPtr nativeAnimation = clutter_actor_animatev(_clutterActorNative, (ulong)mode, duration, 3, new string[]{property1, property2, property3}, pointer); return new Animation( nativeAnimation ); } [DllImport ("libclutter-glx-1.0.so.0")] private static extern IntPtr clutter_actor_animatev(IntPtr actor,ulong mode, uint duration,int n_properties, string[] properties, IntPtr values); On Wed, Jun 23, 2010 at 10:11 PM, Neil Roberts <n...@linux.intel.com> wrote: > > Daniel Hughes <tramps...@gmail.com> 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 clutter+unsubscr...@o-hand.com