Skip to content

Commit

Permalink
Fix for requiring delegate methods (cappuccino#36), and for JSONP not…
Browse files Browse the repository at this point in the history
… calling the run loop.

[cappuccino#36 state:resolved];
  • Loading branch information
Ross Boucher committed Sep 18, 2008
1 parent a64d1a1 commit 53d4a71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AppKit/CPAnimation.j
Expand Up @@ -211,7 +211,7 @@ ACTUAL_FRAME_RATE = 0;
- (void)startAnimation
{
// If we're already animating, or our delegate stops us, animate.
if (_timer || _delegate && ![_delegate animationShouldStart:self])
if (_timer || _delegate && [_delegate respondsToSelector:@selector(animationShouldStart)] && ![_delegate animationShouldStart:self])
return;

_progress = 0.0;
Expand Down Expand Up @@ -258,7 +258,8 @@ ACTUAL_FRAME_RATE = 0;
window.clearTimeout(_timer);
_timer = nil;

[_delegate animationDidStop:self];
if ([_delegate respondsToSelector:@selector(animationDidStop:)])
[_delegate animationDidStop:self];
}

/*
Expand Down
2 changes: 2 additions & 0 deletions Foundation/CPJSONPConnection.j
Expand Up @@ -56,6 +56,8 @@ CPJSONPConnectionCallbacks = {};
{
[_delegate connection:self didReceiveData:data];
[self removeScriptTag];

[[CPRunLoop currentRunLoop] performSelectors];
};

if(shouldStartImmediately)
Expand Down

0 comments on commit 53d4a71

Please sign in to comment.