title: How do I open an NSSheet in Mavericks?
body: <p>In Mavericks, the methods to open and close NSSheets has changed. And to make it tougher, the <a href="https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/index.html#//apple_ref/doc/uid/TP30000741-CH2-SW7" rel="nofollow">Release Notes</a> do not match the current documentation (see below).</p>
  
  <p>I'm trying to do this:</p>
  
  <p>MainSheetController (NSWindowController):</p>
  
  <pre><code>-(IBAction)callSheet:(id)sender {
      [sheetController openSheet];
  }
  </code></pre>
  
  <p>SheetController (NSObject):</p>
  
  <pre><code> (void)openSheet {  
      [[NSBundle mainBundle] loadNibNamed:sheetName owner:self topLevelObjects:nil];
      NSLog(@"1");
      [self.mainWindowController.window beginSheet:self.sheet completionHandler:nil];
      NSLog(@"2");    
  }
  </code></pre>
  
  <p>I get to 2, with no errors or warnings, but no sheet.. </p>
  
  <p>Current Documentation:</p>
  
  <pre><code>#if NS_BLOCKS_AVAILABLE
  - (void)beginSheet:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler NS_AVAILABLE_MAC(10_9);
  - (void)beginCriticalSheet:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler NS_AVAILABLE_MAC(10_9);
  #endif
  </code></pre>