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: julius <email@hidden>
- Date: Wed, 4 Aug 2010 10:47:19 +0100
> ..... 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
Hi Jason,
Recently I too had been having difficulties understanding the responder chain where a nib was involved.
The idea of a responder chain was fine but I could not understand how objects in different windows could simultaneously claim first responder status. In none of my reading did I notice anything which said that the responder chain did not go across nibs. What did finally provide a helpful hint was the window programming guide which spoke of main and key windows. This made me think that perhaps there wasn't just one responder chain but one for each window and therefore whenever one of the objects in a window gained first responder status it also needed to ask if it were in the key window.
My app consisted of two windows, one of which was a nib. Each contained an NSTableView which needed to respond to menu copy and paste notifications. On the basis of the preceding logic I had an NSTableView to do its thing only if it were 1st responder and in the key window. Whether that was the "correct" answer I have no way of knowing but it seemed to work in this instance.
all the best
Julius
------------------------------------------------------
http://juliuspaintings.co.uk
I'm looking for comments re: http://juliuspaintings.co.uk/physics-of-thought
_______________________________________________
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