• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Progress Indicators Spin vs Bar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress Indicators Spin vs Bar


  • Subject: Re: Progress Indicators Spin vs Bar
  • From: James Merkel <email@hidden>
  • Date: Mon, 20 Jun 2011 00:36:19 -0700

It turns out if I use setUsesThreadedAnimation:YES on the progress indicator, the bar indicator animates.

The docs say this method sets a hint as to whether the receiver should implement animation of the progress indicator in a separate thread. I guess the hint is taken and the animation is performed in a separate thread.

Jim Merkel


On Jun 19, 2011, at 1:38 PM, James Merkel wrote:


On Jun 19, 2011, at 1:27 PM, Quincey Morris wrote:

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.


Ok thanks -- I didn't realize there was a difference in the way the two progress indicators worked.

_______________________________________________

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


  • Follow-Ups:
    • Re: Progress Indicators Spin vs Bar
      • From: Kyle Sluder <email@hidden>
References: 
 >Progress Indicators Spin vs Bar (From: James Merkel <email@hidden>)
 >Re: Progress Indicators Spin vs Bar (From: Quincey Morris <email@hidden>)
 >Re: Progress Indicators Spin vs Bar (From: James Merkel <email@hidden>)

  • Prev by Date: Re: NSArrayController loses selection upon CoreData refreshObject.
  • Next by Date: Re: How to redraw a view in slow-motion
  • Previous by thread: Re: Progress Indicators Spin vs Bar
  • Next by thread: Re: Progress Indicators Spin vs Bar
  • Index(es):
    • Date
    • Thread