#36 ✓resolved
Joris Kluivers

CPAnimation delegate implementation

Reported by Joris Kluivers | September 13th, 2008 @ 02:12 AM

When setting the delegate for CPAnimation that doesn't implement all delegate methods an 'undefined' javascript error occurs. It shouldn't be the desired behaviour to require all delegate methods to be implemented.

At this time I'm using a category on CPObject to implement default implementations for all delegate methods to workaround the issue.

@implementation CPObject (CPAnimationDelegate) -(BOOL)animationShouldStart:(CPAnimation)animation {

return YES;

} -(void)animationDidEnd:(CPAnimation)animation {} -(void)animationDidStop:(CPAnimation)animation {} - (float)animation:(CPAnimation)animation valueForProgress:(float)progress {

return progress;

} @end

Comments and changes to this ticket

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

People watching this ticket

Referenced by

Pages