I am trying to do an indeterminate progress indicator in a small NSPanel window similar to that shown in Figure 15-57 of the OSXHIGuidelines. The NSPanel and NSProgresssIndicator are in a nib file and I'm pretty sure the IB connections are correct. If I use a spin progress indicator, I can start the animation. If I switch to a bar progress indicator, I can't start the animation. (Looking at the archives, this seems opposite from what other people have experienced - they had problems with the spin progress indicator). The code is pretty simple. I have a ProgressController class defined as follows in .h and .m files:

@interface ProgressController : NSWindowController {
        IBOutlet NSProgressIndicator *progressIndicator;
}
-(void)startProgressAnimation;
@end


#import "ProgressController.h"

@implementation ProgressController

-(id)init{
    self = [super initWithWindowNibName:@"ProgressWindow"];
        [self setWindowFrameAutosaveName:@"ProgWindow"];

        return self;
}

-(void)windowDidLoad{

}

-(void)startProgressAnimation{
        NSLog(@"progressIndicator should start");
        [progressIndicator startAnimation:nil];
}

@end

Then use the progress  indicator as follows;

        ProgressController * progressController = nil;  
        progressController =[[ProgressController alloc] init];
        NSLog(@"Progress window: %@\n", [progressController window]);
        [progressController startProgressAnimation];
        [progressController showWindow:self];

        (Long processing)

        [progressController close];
        [progressController release];

So this works with the spinner but not the bar. Seems strange because I thought the two progress indicators would work the same.

Thanks for any help.

Jim Merkel

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to