Re: Leopard broke my progress indicators
Re: Leopard broke my progress indicators
- Subject: Re: Leopard broke my progress indicators
- From: John Stiles <email@hidden>
- Date: Sun, 16 Dec 2007 07:38:12 -0800
What exactly do you mean by a determinate spinning progress bar?
I don't think such a thing is standard UI...?
On Dec 16, 2007, at 7:22 AM, David Burnett wrote:
Hello everyone.
I maintain an application which updates a determinate spinning
NSProgressIndicator 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:
40blizzard.com
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