Re: NSWindowController
Re: NSWindowController
- Subject: Re: NSWindowController
- From: Ken Thomases <email@hidden>
- Date: Mon, 29 Aug 2011 19:57:18 -0500
On Aug 29, 2011, at 6:13 PM, Jens Alfke wrote:
> On Aug 29, 2011, at 3:51 PM, koko wrote:
>
>> I have created a nib which contains a window. I have set the File's Owner to NSWindowController.
>> I have connected the window outlet of File's Owner to the window defined in the nib.
>
> Don’t forget to wire the window’s delegate outlet up to the File’s Owner, too … omitting that will cause problems later on.
Nope, that's not true. From the docs <http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Concepts/WinControllersAndNibs.html>:
> Note: NSWindowController does not depend on being the controlled window's delegate to do its job, and it doesn't implement any NSWindow delegate methods. A subclass of NSWindowController, however, is a fine place to put implementations of NSWindow delegate methods, and if you do so you'll probably need to connect the delegate outlet of the window to the nib file's owner as described, but you do not have to do so for NSWindowController itself to work properly.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden