• 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
Need help understanding first responder and multiple nibs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help understanding first responder and multiple nibs


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

Greetings,

I've set up a test project in order to understand how first responder works
across multiple nibs in a document-based application.  In my application,
MyDocument has a window with a text field and a single button on it which, when
clicked, loads a second nib file which has only a window with a button on it.
 File's owner on the second nib file is a sub-class of NSWindowController.  I've
connected the button on the second nib file window to that nib file's first
responder proxy object, and have added a method in the first responder proxy
object named "logClick:".  I have implemented logClick: in MyDocument, which
will do nothing but call NSLog(@"logClick called").  The intention is to have
the button on the second window call up the responder chain and be handled by
MyDocument -- but this isn't working.  This works if I connect a menu item to
first responder in the main menu nib which calls logClick:, but not when I
connect it to a button in a separate nib.  Can someone explain where my
misunderstanding is on this.  I've read the docs over and over and still can't
figure it out.

Many thanks.

JWB




_______________________________________________

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: Quincey Morris <email@hidden>
  • Prev by Date: override hyperlink handler for WebView
  • Next by Date: Initialize a GKSession from a view running with presentModalViewController:animated:?
  • Previous by thread: Re: override hyperlink handler for WebView
  • Next by thread: Re: Need help understanding first responder and multiple nibs
  • Index(es):
    • Date
    • Thread