title: Adding an NSProgressIndicator to the dock icon
body: <p>I'm creating an application which should show a progress bar in the dock icon. Currently I have this, but it's not working:</p>
  
  <pre><code>  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];
  </code></pre>
  
  <p>Or must I draw it on the dock myself? Can anyone help me? Thanks.</p>