Re: Preventing textfield in table from clicking default button
Re: Preventing textfield in table from clicking default button
- Subject: Re: Preventing textfield in table from clicking default button
- From: Seth Willits <email@hidden>
- Date: Sat, 16 Aug 2014 19:57:50 -0700
On Aug 16, 2014, at 7:53 PM, Seth Willits <email@hidden> 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...
- (void)textDidBeginEditing:(NSNotification *)notification;
{
self.window.defaultButtonCell.keyEquivalent = @"";
[super textDidBeginEditing:notification];
}
- (void)textDidEndEditing:(NSNotification *)notification;
{
[super textDidEndEditing:notification];
self.window.defaultButtonCell.keyEquivalent = @"\r";
}
--
Seth Willits
_______________________________________________
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