• 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: Leopard broke my progress indicators
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leopard broke my progress indicators


  • Subject: Re: Leopard broke my progress indicators
  • From: David Burnett <email@hidden>
  • Date: Sun, 16 Dec 2007 16:00:31 +0000

John Stiles wrote:
What exactly do you mean by a determinate spinning progress bar?
I don't think such a thing is standard UI...?


Funny what happens when you don't read the NSProgressIndicator Class reference properly isn't it.


It may have not been official option but setting the max, min and value would actually animate the spinning progress bar like you would expect.
I never though to check if it was *supposed* to work and it quite clearly did. I guess I'll have to detect which version of OS X I'm running on and set the style based on that.



Thanks for you help anyway.

Dave


I maintain an application which updates a from a worker thread using the following category.

#import <AppKit/NSProgressIndicator.h>


@interface NSProgressIndicator (NSProgressIndicatorUpdateOnMainThread)

- (void)setDoubleValueInMainThread:(NSNumber *)doubleValue;
- (void)__setDoubleValueInMainThread:(NSNumber *)doubleValue;

@end

-------

#import "NSProgressIndicatorUpdateOnMainThread.h"

@implementation NSProgressIndicator (NSProgressIndicatorUpdateOnMainThread)

- (void)setDoubleValueInMainThread:(NSNumber *)value {
[self performSelectorOnMainThread:@selector(__setDoubleValueInMainThread:) withObject:value waitUntilDone:NO];


}

- (void)__setDoubleValueInMainThread:(NSNumber *)value {

[self setDoubleValue:[value doubleValue]];
[self displayIfNeeded];
}



All fairly standard stuff, and it works fine in Tiger, in Leopard however the indicator does not animate. I've trying recompiling in Leopard to no avail.


The Debugger clearly shows that the __setDoubleValueInMainThread gets called, and it gets called in the main thread. According to the debugger the _minimum, _maximum and _value variables are the expected values while running. _animationIndex and _progressIndicator.isSpinning are always 0


If I change the indicator to bar style it shows progress, and _animationIndex changes, _progressIndicator.isSpinning is 1. Using a indeterminate Spinning indicator works and animates properly.

Bar indicators, however, use way to much CPU under Tiger (and congrats to Apple for fixing that in Leopard) so I want to get the Spinning indicator working again. So any body got an idea what I'm going wrong.



Dave
_______________________________________________

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



_______________________________________________

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: Leopard broke my progress indicators
      • From: John Stiles <email@hidden>
References: 
 >Leopard broke my progress indicators (From: David Burnett <email@hidden>)
 >Re: Leopard broke my progress indicators (From: John Stiles <email@hidden>)

  • Prev by Date: Re: A better -description?
  • Next by Date: Re: Leopard broke my progress indicators
  • Previous by thread: Re: Leopard broke my progress indicators
  • Next by thread: Re: Leopard broke my progress indicators
  • Index(es):
    • Date
    • Thread