Re: Need help understanding first responder and multiple nibs
Re: Need help understanding first responder and multiple nibs
- Subject: Re: Need help understanding first responder and multiple nibs
- From: Kyle Sluder <email@hidden>
- Date: Tue, 3 Aug 2010 17:00:52 -0700
On Tue, Aug 3, 2010 at 4:50 PM, Jason Bruce <email@hidden> wrote:
> After thinking about this for awhile, it's all starting to make sense. In order
> to place associate an nswindowcontroller with a document, you just have to call
> addwindowController after you create the additional nswindowcontroller. This
> will place the secondary nib file in the document's responder chain, so there
> will be no need to pass in a reference to the document to the secondary window
> controller, and no need to call an action in the window controller.
No, your reasoning is still wrong. Nib files aren't things that can be
in the responder chain. The responder chain isn't magically aware of
nib files; it simply follows the links described in the documentation,
starting from the key window.
Your bug was that you weren't calling -[NSDocument
addWindowController:]. -addWindowController: calls -setDocument: on
the window controller, thus doing exactly what you said you didn't
think you had to do.
--Kyle Sluder
_______________________________________________
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