Re: Preventing textfield in table from clicking default button

2014-08-17 Thread Seth Willits
On Aug 16, 2014, at 9:03 PM, Ken Thomases wrote: > The general mechanism is to implement the control delegate method > -control:textView:doCommandBySelector: and alter the response to the > "insertNewline:" selector. Thank you. That's exactly the right thing to do. I've used it before for di

Re: Preventing textfield in table from clicking default button

2014-08-17 Thread dangerwillrobinsondanger
> On 2014/08/17, at 13:03, Ken Thomases wrote: > > > I recommend that you do a variant of the technique outlined in Technical Q&A > QA1454: How to make NSTextField accept tab, return and enter keys. > https://developer.apple.com/library/mac/qa/qa1454/_index.html > > The general mechanism i

Re: Preventing textfield in table from clicking default button

2014-08-16 Thread Ken Thomases
On Aug 16, 2014, at 9:53 PM, Seth Willits wrote: > When editing in a NSTextField and return is pressed, it fires the text > field's action and also sends performKeyEquivalent: to the window, which > clicks the default button. Usually that's just fine, but in the case where a > view-based table

Re: Preventing textfield in table from clicking default button

2014-08-16 Thread Seth Willits
On Aug 16, 2014, at 7:53 PM, Seth Willits wrote: > This is leaving me little choice but to do something very specialized and > ugly. Well… the simplest solution is to just disable the key equivalent myself instead of using NSWindow's methods. I don't like it, but it does work in my case...