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 09:13:23 -0800
Why don't you do something like what Mail.app does for its progress
indicators (simple circles that fill in pie-chart style)?
Trying to hijack the spinning progress indicator to do something it's
not designed to do is bad UI, because it's inconsistent with all
other apps on the platform. Users who see that icon won't expect it
to be used for determinate progress indication, so one of two things
will happen:
- they will think your app looks bad
- they will not realize that the indicator is determinate at all
Either outcome is bad...
On Dec 16, 2007, at 8:00 AM, David Burnett wrote:
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:
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