Re: [BUG SUBMITTED] Text Field Cells in Table View: Enabled and Editable not working
Re: [BUG SUBMITTED] Text Field Cells in Table View: Enabled and Editable not working
- Subject: Re: [BUG SUBMITTED] Text Field Cells in Table View: Enabled and Editable not working
- From: Jens Alfke <email@hidden>
- Date: Fri, 04 Jan 2013 13:26:09 -0800
On Jan 4, 2013, at 11:52 AM, Jerry Krinock <email@hidden> wrote:
> Instead of getting a focus ring around the clicked cell, you get a 1-pixel gray rectangle.
> Instead of the text being highlighted normally, you get a gray highlight.
> When you type characters, a sysbeep.
This isn’t a bug, if I understand the issue correctly. An NSWindow without a title-bar returns NO from -canBecomeKeyWindow, so the window won’t accept keyboard focus. That’s why the highlight is gray and you can’t type into it.
To work around this, subclass NSWindow and override -canBecomeKeyWindow to return YES.
Or if you’re using the window for a sheet, just set the title-bar checkbox. It won’t make any visual change at runtime (title bars are always suppressed in sheets) but it will enable key focus.
—Jens
_______________________________________________
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