Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 9:38 AM, Kyle Sluder wrote: > On Aug 21, 2012, at 9:07 AM, Jean Suisse wrote: > >> Well, then you just need to override: >> >> - (BOOL)needsPanelToBecomeKey >> >> in the NSTableView (subclass) and return NO. > > I'll try it, but frankly this doesn't make sense. I *do*

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 9:38 AM, Kyle Sluder wrote: > On Aug 21, 2012, at 9:07 AM, Jean Suisse wrote: > >> Well, then you just need to override: >> >> - (BOOL)needsPanelToBecomeKey >> >> in the NSTableView (subclass) and return NO. > > I'll try it, but frankly this doesn't make sense. I *do*

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 9:02 AM, Kyle Sluder wrote: > On Aug 21, 2012, at 8:43 AM, Corbin Dunn 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 becomesKeyOnlyIfNe

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Kyle Sluder
On Aug 21, 2012, at 9:07 AM, Jean Suisse wrote: > Well, then you just need to override: > > - (BOOL)needsPanelToBecomeKey > > in the NSTableView (subclass) and return NO. I'll try it, but frankly this doesn't make sense. I *do* want the panel to become key when the user clicks the table vie

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
Well, then you just need to override: - (BOOL)needsPanelToBecomeKey in the NSTableView (subclass) and return NO. More info here : https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/nsview_Class/Reference/NSView.html This should do the trick. (It work

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Kyle Sluder
On Aug 21, 2012, at 8:43 AM, Corbin Dunn 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 Sui

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
That's perfect. Thank you very much. I have been dragging this inconvenience in my app for a long time now… Jean On 21 août 2012, at 17:43, Corbin Dunn wrote: > Override: > > - (BOOL)needsPanelToBecomeKey > > and return NO. If you think about it...that is conceptually what you want. > Also

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 8:14 AM, Keary Suska wrote: > On Aug 21, 2012, at 8:59 AM, Jean Suisse wrote: > >> Thank you very much for your reply. >> >> Id did override acceptsFirstMouse all the way down to the NSTableView >> subclass. And i did the same for acceptsFirstResponder. >> Both acceptsFirs

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
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. -corbin On Aug 21, 2012, at 5:48 AM, Jean Suisse wrote: > Hello, > > I have an NSPan

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Keary Suska
On Aug 21, 2012, at 8:59 AM, Jean Suisse wrote: > Thank you very much for your reply. > > Id did override acceptsFirstMouse all the way down to the NSTableView > subclass. And i did the same for acceptsFirstResponder. > Both acceptsFirstMouse and acceptsFirstResponder are only called for the >

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Keary Suska
On Aug 21, 2012, at 6:48 AM, Jean Suisse wrote: > I have an NSPanel window that contains an NSTableView with the usual setup > (NSPanel -> content view (NSView) -> NSScrollView -> NSTableView -> etc). > When the Panel does not have the focus, clicking on an item of the table view > will first ac

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
Well, apparently Glen Low did post a similar question, back in 2007. http://lists.apple.com/archives/cocoa-dev/2007/Jun/msg00897.html Jean Suisse Institut de Chimie Moléculaire de l’Université de Bourgogne (ICMUB) — UMR 6302 U.F.R. Sciences et Techniques, Bâtiment Mirande Aile B, bureau 411 9, av