Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fritzables

macrumors regular
Original poster
May 6, 2011
149
1
Brisbane AUSTRALIA
Hi All,

If I have a number of controls set within a window and some of them I don't want them to receive Focus when I hit the Tab key - how is this best done?

Pete
 
I know to override acceptFirstResponder in an NSResponder (and therfore NSView) subclass to return NO when I want a view to not accept focus. But if you're not already dealing with subclasses, this would be PITA.

BTW When you're researching this, the concept you know of as focus is known as first responder in Cocoa. It's related to the concept of the responder chain.
 
If you are constructing your UI in a nib, you can define the key view loop using dragged connections.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.