• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need help understanding first responder and multiple nibs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help understanding first responder and multiple nibs


  • Subject: Re: Need help understanding first responder and multiple nibs
  • From: Jason Bruce <email@hidden>
  • Date: Tue, 3 Aug 2010 17:25:14 -0700 (PDT)

Hi Kyle,

We are in agreement that the piece I was missing was the call to
addWindowController.  I was perhaps a bit sloppy when I said that the nib file
was in the responder chain versus the nswindowcontroller.  But my whole point
was to understand how the responder chain works in a document-based application
across different nibs -- which wasn't clear to me from the docs or the archives.

Jason

----- Original Message ----
> From: Kyle Sluder <email@hidden>
> To: Jason Bruce <email@hidden>
> Cc: email@hidden
> Sent: Tue, August 3, 2010 7:00:52 PM
> Subject: Re: Need help understanding first responder and multiple nibs
>
> 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

  • Follow-Ups:
    • Re: Need help understanding first responder and multiple nibs
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: Need help understanding first responder and multiple nibs (From: Jason Bruce <email@hidden>)
 >Re: Need help understanding first responder and multiple nibs (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Need help understanding first responder and multiple nibs
  • Next by Date: Re: Need help understanding first responder and multiple nibs
  • Previous by thread: Re: Need help understanding first responder and multiple nibs
  • Next by thread: Re: Need help understanding first responder and multiple nibs
  • Index(es):
    • Date
    • Thread