Re: Determinate NSProgressIndicator without animation?
Re: Determinate NSProgressIndicator without animation?
- Subject: Re: Determinate NSProgressIndicator without animation?
- From: Jonathan Hendry <email@hidden>
- Date: Fri, 14 Sep 2001 17:10:58 -0500
On Friday, September 14, 2001, at 09:43 , Stiphane Sudre wrote:
On vendredi, septembre 14, 2001, at 12:42 PM, Nicolai wrote:
I've seen in a program a determinate progress indicator
without these shapes floating to the left. Simply a blue
beam similar to the old MacOS.
Does anyone know how to 'deactivate' the animation?
The progress Indicator needs to have this animation for 2 reasons:
- it's cool and it makes the CPU work.
Sometimes you don't want it to look cool, and you don't want
to waste the cycles.
- it allows the user to know that the process is not halted when the bar
does not grow for a period
But this is not always needed or desired.
What you're looking for seems to be a "percentage" widget. It
is available in Carbon, not in Cocoa.
So why not subclass NSProgressIndicator to create a percentage
widget?
I've done it.
Just create the subclass and override the following:
- (void)startAnimation:(id)sender
{
}
- (void)stopAnimation:(id)sender
{
}
- (void)animate:(id)sender
{
}
Remove the drawRect method from the template PB provides.
Voila, done.