Need help understanding first responder and multiple nibs
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