title: How To Force A NSTextField Label To Refresh
body: <p>What I'm trying to do seem simple but the implementation is throwing me.  How can I force a label to refresh after I change it's value?</p>
  
  <p>I've just created a simple progress window.  As the main app is doing something I pop up the progress window and I want to update the values of the label and the progress bar as the loop executes.</p>
  
  <p>I created a new NSWindow and XIB file that has outlets to the label and the progressbar and I'm loading it with this:</p>
  
  <pre><code>_pbWindow                           = [[ProgressBar alloc] initWithWindowNibName:@"ProgressBar"];
  
  [_pbWindow showWindow:self];
  </code></pre>
  
  <p>When I call:</p>
  
  <pre><code>_pbWindow.lblProgress1.stringValue = @"Doing this now...";
  </code></pre>
  
  <p>I can't get the label to actually refresh in the new window.</p>
  
  <p>I have searched here and google and can't seem to find anything to tell me how to do this in a different window, only that if it's in the main window that it will just refresh (as has always been my experience anyway).</p>
  
  <p>I thought maybe it was because the window didn't have focus so I tried opening it modally:</p>
  
  <pre><code>[[NSApplication sharedApplication] beginSheet:[_pbWindow window]
                                 modalForWindow:[[NSApplication sharedApplication] mainWindow]
                                  modalDelegate:_pbWindow
                                 didEndSelector:nil
                                    contextInfo:nil];
  </code></pre>
  
  <p>And still it doesn't work.</p>