Leopard broke my progress indicators
Leopard broke my progress indicators
- Subject: Leopard broke my progress indicators
- From: David Burnett <email@hidden>
- Date: Sun, 16 Dec 2007 15:22:22 +0000
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:
This email sent to email@hidden