title: Programmatically create NSButton and set custom NSButtonCell
body: <p>Ok, this seems like it should very simple, but I'm coming from iOS and and I must be missing something very obvious. So I have a custom subclass of NSButtonCell. If I create a NSButton in IB and assign the NSButtonCell in IB, it works no problem.</p>
  
  <p>However, I need to programmatically create this button. I've looked at a couple of examples and have the following within awakeFromNib, however, it creates what appears to be a regular button with my custom button cell underneath (I can tell when I click on the button).</p>
  
  <pre><code>NSButton* button = [[NSButton alloc] initWithFrame:NSMakeRect(100, 100, 60, 30)];
  CT_CaptureButtonCell* captureCell = [[CT_CaptureButtonCell alloc] init];
  [button setCell:captureCell];
  [captureCell release];
  [self.view addSubview:button];
  </code></pre>
  
  <p>So what dumb thing am I missing / not understanding? Thanks.</p>