I'm creating an application which should show a progress bar in the dock icon. Currently I have this, but it's not working:
NSProgressIndicator *progressIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, 10.0f, 20.0f)];
[progressIndicator setStyle:NSProgressIndicatorBarStyle];
[progressIndicator setIndeterminate:NO];
[[[[NSApplication sharedApplication] dockTile] contentView] addSubview:progressIndicator];
[progressIndicator release];
Or must I draw it on the dock myself? Can anyone help me? Thanks.