Working with NSWindow
The NSWindow class encapsulates windows in Cocoa. Each instance of MYDocument has an associated window that represents the document on the screen. Instances of MYDocument need to be informed when the user uses the standard File, Save and File, Save As menu items. MYDocument also needs to know when its associated window is closed so that it can prompt the user to save unsaved documents.
It is not necessary to subclass NSWindow to get it to interoperate with MYDocument. Classes such as NSWindow are seldom subclassed because they provide delegate methods that enable customization of behavior without the need to subclass.
The NSWindow class provides delegate methods to inform a delegate object when attributes of the window ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access