> On 4 Aug 2015, at 12:17 am, Alex Zavatone <z...@mac.com> wrote:
> 
> Why not store all your references in an array (a little lookup table), then 
> set the firstResponder to the reference from the index of the object in the 
> array + 1 and roll over to index 0 if the index is past the count of the 
> array?
> 

But why? Views already have a perfectly servicable mechanism for linking a 
series of fields (or any other items) in a sequence, called the ‘nextKeyView’ 
outlet.

The problem I’m having is not determining which field to select, but making it 
actually select so that the user can type into it without needing it to be 
clicked again, despite showing the focus ring.


> Shouldn't it be [self makeFirstResponder:myTextFieldRef]?


This code is in a NSWindowController, not a NSWindow. While that is a 
NSResponder subclass and does respond to the message, it’s the window that 
selects among its subviews - at least that’s how I’ve always written code like 
this. I will check whether doing this makes any difference though.

—Graham



_______________________________________________

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

Reply via email to