CPAnimation setAnimationCurve: Rejects CPAnimationLinear
Reported by Alex J | December 21st, 2008 @ 08:21 PM | in 0.6.5
Cappuccino version 0.6 (and possibly others). CPAnimation.j: 117 - 137:
There is a switch statement on line 123 that is designed to
raise an Illegal Argument Exception if the animation curve is not
one of the known constants. However, there is no case for
CPAnimationLinear
, so calling [myAnim
setAnimationCurve: CPAnimationLinear]
raises an exception,
even thought that is a valid curve.
Comments and changes to this ticket
-
Alex J December 21st, 2008 @ 08:23 PM
- Title changed from CPAnimation setAnimationCurve: can assign invalid animationCurve to CPAnimation setAnimationCurve: Rejects CPAnimationLinear
-
Alex J December 22nd, 2008 @ 07:53 AM
Here's a modified version of
setAnimationCurve:
that resolves #175 and #176:- (void)setAnimationCurve:(CPAnimationCurve)anAnimationCurve { var timingFunctionName; switch (anAnimationCurve) { case CPAnimationEaseInOut: timingFunctionName = kCAMediaTimingFunctionEaseInEaseOut; break; case CPAnimationEaseIn: timingFunctionName = kCAMediaTimingFunctionEaseIn; break; case CPAnimationEaseOut: timingFunctionName = kCAMediaTimingFunctionEaseOut; break; case CPAnimationLinear: timingFunctionName = kCAMediaTimingFunctionLinear; break; default: [CPException raise:CPInvalidArgumentException reason:"Invalid value provided for animation curve"]; break; } _animationCurve = anAnimationCurve; _timingFunction = [CAMediaTimingFunction functionWithName:timingFunctionName]; }
-
Francisco Tolmasky December 22nd, 2008 @ 02:36 PM
- Milestone set to 0.6.5
- Assigned user set to Francisco Tolmasky
yeah all this looks good to me
-
admin (at 280north) December 22nd, 2008 @ 02:38 PM
- State changed from new to resolved
(from [08a3b644838f313edbfb919f6fdc864824194451]) Fix for impropert animationCurve being set.
[#175 state:resolved]. [#176 state:resolved].
Reviewed by me. http://github.com/280north/cappu...
-
Francisco Tolmasky December 22nd, 2008 @ 02:38 PM
K, its in, I don't have your email/info so I couldn't put you as the author though. If you send it to me I can go ahead and change the commit log.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.
People watching this ticket
Tags
Referenced by
- 176 CPAnimation setAnimationCurve: Can Assign Invalid _animationCurve Here's a modified version of setAnimationCurve: that reso...
- 175 CPAnimation setAnimationCurve: Rejects CPAnimationLinear Here's a modified version of setAnimationCurve: that reso...
- 175 CPAnimation setAnimationCurve: Rejects CPAnimationLinear [#175 state:resolved]. [#176 state:resolved].
- 176 CPAnimation setAnimationCurve: Can Assign Invalid _animationCurve [#175 state:resolved]. [#176 state:resolved].