Re: Focus issues with NSTableView in NSPanel
Re: Focus issues with NSTableView in NSPanel
- Subject: Re: Focus issues with NSTableView in NSPanel
- From: Kyle Sluder <email@hidden>
- Date: Tue, 21 Aug 2012 09:02:17 -0700
On Aug 21, 2012, at 8:43 AM, Corbin Dunn <email@hidden> wrote:
> Override:
>
> - (BOOL)needsPanelToBecomeKey
>
> and return NO. If you think about it...that is conceptually what you want. Also, the window could return YES from becomesKeyOnlyIfNeeded, and it should also work.
I don't know what Jean Suisse needs, but we've been trying to achieve a very similar goal: clicking on a table view in a non-key window should cause the selection to change *and* should cause that window to become key (with the table view as first responder).
Yes, we understand this is a departure from standard behavior. But this is the behavior we desire. (The table view lives in an inspector window and shows a fair bit of data, and users expect to be able to navigate it with the keyboard.)
Unfortunately, the only thing we've done that seems to work is to override -acceptsFirstMouse: to call [self.window makeKeyAndOrderFront:] before returning YES. This feels incredibly hacky. Is there no other way?
--Kyle Sluder
_______________________________________________
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