Re: Properly supporting 'delete' key presses in NSTableView
Re: Properly supporting 'delete' key presses in NSTableView
- Subject: Re: Properly supporting 'delete' key presses in NSTableView
- From: "Sean McBride" <email@hidden>
- Date: Mon, 20 Oct 2008 17:45:02 -0400
- Organization: Rogue Research
On 10/20/08 2:27 PM, Corbin Dunn said:
>> Overriding deleteBackward: (from NSResponder) doesn't seem to work.
>> For
>> some reason, it is never called.
>
>For various reasons, NSTableView doesn't implement -
>interpretKeyEvents:, that's why it isn't called.
Thanks for your reply Corbin!
I assume NSOutlineView is the same?
>This will work well, and is the only good way to implement it.
>Ideally, you would only want to do this if there isn't an active "type
>select" going on, but there is no API to tell if that is happening or
>not. (As usual, feel free to log requests for that). Theoretically,
>backspacing while type selecting could undo the last character; in
>practice, that is a dangerous thing to do, since you might
>accidentally delete something you didn't intend to.
A few quickie followups, if I may:
- so will this actually work with custom keybindings? Or is there just
no good way to support that?
- did I miss a constant for the backward delete char (an analogue to
NSDeleteCharacter)? I'm using 0xf728, discovered via gdb. :(
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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