On 2009-10-29, at 0:30 , DKJ wrote:
- (IBAction)updateButton:(id)sender
{
[UIApplication sharedApplication].networkActivityIndicatorVisible
= YES;
[downloadIndicator startAnimating];
[[DataManager sharedDataManager] updateDataFiles];
[downloadIndicator stopAnimating];
[UIApplication sharedApplication].networkActivityIndicatorVisible
= NO;
}
I replaced the line:
[downloadIndicator startAnimating];
with this:
NSInvocationOperation *theOp = [[[NSInvocationOperation alloc]
initWithTarget:downloadIndicator
selector:@selector(startAnimating) object:nil] autorelease];
NSOperationQueue *theQ = [[[NSOperationQueue alloc] init]
autorelease];
[theQ addOperation:theOp];
and now it works just the way I want it to.
But am I taking a sledgehammer to a fly? Or have I found (quite by
accident) the best way to do it?
dkj
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com