I have a custom NSView (actually subclass of NSTextField) in which I've overridden acceptsFirstResponder to return YES whether the superclass text field is editable or not. It also returns YES to canBecomeKeyView. I have 6 of them on-screen and lots of logging. The 6 are dynamically added, not from a nib.
When the app starts the first one is asked if it can become first responder, says YES, asked it it can become key, says YES and indeed becomes first responder and hitting a key shows that view is getting keys it because it logs. If I mouse-click on another of the windows that window is asked if it can become first responder, it says YES, but nothing changes. The first one isn't asked to resign, the one I just clicked doesn't become first responder, it's not asked if it can become key, the key focus stays the same (another keypress is still handled by the same first custom view). I log the first responder each time and it never changes. The windows are chained to be each others nextResponder and nextKeyView. I can't find anything else to override. Surely the clicked NSView subclass should just become first responder (and key). _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com