Question

I'm using NSProgressIndicator in my ETL app for OS X and hat I'm indicating with it is the current state od downloading sources of given pages.

Everything is fine when in a first run - works like charm. The problem appears when I hit the reset button and try to run whole process one more time - the indicator is fully loaded at the begining.

Sound to me like I need to restore it to the default values but I have no clue how...

- (IBAction)showAction:(id)sender
{
    [[self panel] display];
    NSLog( @"Show action" );
}

- (IBAction)restartETLAction:(id)sender
{
    [etl restart];
    [self setProgressBar:nil];
    NSLog( @"Restart action" );
}

- (void) showProgressBarPanelWithTitle:(NSString *) title
{
    [[self panel] setTitle:title];
    [[self panel] makeKeyAndOrderFront:self];
}

- (void) updateProgressBarPanelWithProgressLevel:(double) progressLevel
{
    [[self progressBar] setDoubleValue:progressLevel];
    [[self progressBar] startAnimation:self];
}

- (void) hideProgressBarPanel
{
    [self.progressBar stopAnimation:self];
    [[self panel]  orderOut:self];
}

Of course I have some properties:

@property (assign) IBOutlet NSPanel *panel;
@property (assign) IBOutlet NSProgressIndicator *progressBar;
Was it helpful?

Solution 2

I found an answer. I needed to nil some objects just to restart te whole process of the application. So after that the app creates new instances of this objects and the are clean so the NSProgressIndicator works like it should.

OTHER TIPS

bring the NSProgress indicator front as shown below and try again. comment your error if anything u got

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top