Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't my sheet attached to the window it's run for?

This happened to me a couple of days ago:

  • You forgot to set the window outlet of your window controller (File's owner of the Nib file). As Indicated by Nathan, you may see that the -[NSWindowController window] method returns nil.
  • You must also uncheck the Visible at launch option of the sheet.

If mainWindow is nil then the sheet will be displayed as a window/dialog.