window of document

James Walker

Say I create a new document-based Mac app in Xcode 12.4. In Document.xib, I see that Document, the File’s Owner, has an outlet “window”. But in the source code of the Document class, if I try to refer to “self.window”, I get a compile error, “no getter method for read from property”. I tried adding a property declaration for a window IBOutlet property of Document, but then I got a weird situation where the document creates an NSWindowController that does not own any window. What’s going on? This is too basic, I’m sure that whatever the answer is, it will make me slap my head and say “duh”.

Join { to automatically receive all group messages.