Re: Properly supporting 'delete' key presses in NSTableView

2008-10-21 Thread Dalzhim Dalzhim
Well you can easily create a NSTableView category in which you handle the integration of a NSResponder which handles the delete key into the responder chain. This way you won't have to fix this in every single subclass of NSTableView that might appear in the future, wherever it comes from (system c

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-21 Thread Sean McBride
On 10/21/08 9:44 AM, Dalzhim Dalzhim said: >Well the concept is pretty simple. When an instance of NSResponder doesn't >handle a specific event, it is passed up on the responder chain. Instead of >subclassing NSTableView or NSOutlineView, it is only necessary to insert a >new NSResponder instanc

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-21 Thread Corbin Dunn
On Oct 21, 2008, at 6:44 AM, Dalzhim Dalzhim wrote: Well the concept is pretty simple. When an instance of NSResponder doesn't handle a specific event, it is passed up on the responder chain. Instead of subclassing NSTableView or NSOutlineView, it is only necessary to insert a new NSRespon

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-21 Thread Dalzhim Dalzhim
Well the concept is pretty simple. When an instance of NSResponder doesn't handle a specific event, it is passed up on the responder chain. Instead of subclassing NSTableView or NSOutlineView, it is only necessary to insert a new NSResponder instance in the responder chain, after the table view o

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-21 Thread Andy Lee
On Oct 20, 2008, at 5:07 PM, Sean McBride wrote: In 10.5, NSTableView handles many keypresses automatically: up arrow, down arrow, page up, page down, home, end, and even 'type select'. I also need to (robustly!) support the 'delete' key. I just noticed this (thanks to a reference to Opacity o

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Corbin Dunn
On Oct 20, 2008, at 2:49 PM, Dalzhim Dalzhim wrote: This following episode of Late Night Cocoa gives a solution to this precise problem of implementing the delete functionality on TableViews and OutlineViews without having to subclass it. http://www.mac-developer-network.com/podcasts/laten

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Dalzhim Dalzhim
This following episode of Late Night Cocoa gives a solution to this precise problem of implementing the delete functionality on TableViews and OutlineViews without having to subclass it. http://www.mac-developer-network.com/podcasts/latenightcocoa/episode9/index.html Hope it helps :) -Dalzhim

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Sean McBride
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 assum

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Corbin Dunn
On Oct 20, 2008, at 2:07 PM, Sean McBride wrote: Hi all, In 10.5, NSTableView handles many keypresses automatically: up arrow, down arrow, page up, page down, home, end, and even 'type select'. I also need to (robustly!) support the 'delete' key. Overriding deleteBackward: (from NSResponder)

Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Sean McBride
Hi all, In 10.5, NSTableView handles many keypresses automatically: up arrow, down arrow, page up, page down, home, end, and even 'type select'. I also need to (robustly!) support the 'delete' key. Overriding deleteBackward: (from NSResponder) doesn't seem to work. For some reason, it is never