Re: Progress Indicators Spin vs Bar
Re: Progress Indicators Spin vs Bar
- Subject: Re: Progress Indicators Spin vs Bar
- From: Quincey Morris <email@hidden>
- Date: Sun, 19 Jun 2011 13:27:22 -0700
On Jun 19, 2011, at 13:14, James Merkel wrote:
> ProgressController * progressController = nil;
> progressController =[[ProgressController alloc] init];
> NSLog(@"Progress window: %@\n", [progressController window]);
> [progressController startProgressAnimation];
> [progressController showWindow:self];
>
> (Long processing)
>
> [progressController close];
> [progressController release];
>
> So this works with the spinner but not the bar. Seems strange because I thought the two progress indicators would work the same.
They don't. The spinning indicator animates itself, but the bar animation depends on run loop iterations to drive the animation. If "Long processing" means a loop, you're not going back to the run loop. In those circumstances you must arrange for events to be processed (run the run loop or dequeue events in a modal event loop).
Note that you probably want to do that anyway, because you probably want to have a Cancel button on a long-running operation.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden