2718.us blog » detached http://2718.us/blog Miscellaneous Technological Geekery Tue, 18 May 2010 02:42:55 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 NSDocument beginSheet on a New Document http://2718.us/blog/2009/07/17/nsdocument-beginsheet-on-a-new-document/ http://2718.us/blog/2009/07/17/nsdocument-beginsheet-on-a-new-document/#comments Sat, 18 Jul 2009 02:49:43 +0000 2718.us http://2718.us/blog/?p=161 This took over an hour for me to hash out, in part because there are a few mailing list archives and whatnot that I came across while looking into this issue that led me down the wrong path.  I have an NSDocument subclass for which I want a sheet to display modal to the window on initialization of the window.  It seemed that no matter what I did to try to get it to work, what would happen was the sheet would show up detached from the document, then the document would show up on top of it.

… because I had “Visible At Launch” checked for the NSPanel that is my sheet in Interface Builder.  Unchecking that fixed everything, no RunLoop or otherwise delayed-running machinations needed.

]]>
http://2718.us/blog/2009/07/17/nsdocument-beginsheet-on-a-new-document/feed/ 0