Yup you got it.  I actually tracked down an Apple doc in regards to that last 
evening.

I did go ahead and set it up correctly in awakeFromNib as follows:

// DUE to NSBrowser bug in regards to its implementation
// of acceptsFirstResponder, forcibly load it and then
// make it the first responder
[ midiInBrowser loadColumnZero ];
[ [ selfwindow ] makeFirstResponder: midiInBrowser ];

I did have a bit of a research project in that setInitialResponder did not 
result in desired behavior but makeFirstResponder did.  From the little bit I 
could glean from setInitialResponder it seems like this call merely "caches" an 
NSResponder to be set via makeFirstResponder at a later date.

Given that, I can only assume that within awakeFromNib, I'd passed the "later 
date" where setInitialResponder could "cache" usefully.

Always a learning experience. :)

Cheers,
--aj



________________________________
From: Corbin Dunn <corb...@apple.com>
To: Andrew James <andrew_a_ja...@yahoo.com>
Cc: list-cocoa-dev <cocoa-dev@lists.apple.com>
Sent: Thu, March 18, 2010 7:40:06 AM
Subject: Re: NSBrowser and tab order

Aj -- I believe this was a bug fixed in 10.6; maybe 10.5. What OS are you on?

The work around is to set it up in awakeFromNib.

corbin

On Mar 18, 2010, at 1:15 AM, Andrew James wrote:

> I have a nib file set up in Interface Builder with a window containing a 
> single NSBrowser.
> 
> I have set the NSBrowser as the window's initialFirstResponder... but for 
> some reason when the window is displayed the NSBrowser does not receive 
> keyboard focus and will not receive keyboard focus until I click on it.
> 
> I'm hoping I'm missing something trivially easy.


      
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to