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: Tue, 21 Oct 2008 11:35:00 -0400
- Organization: Rogue Research
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 instance in the responder chain, after the table view or the
>outline view so that it handles this case.
>
>Inserting a responder in the responder chain is pretty easy. Once you have
>instantiated your responder, simply set it's nextResponder to the
>nextResponder of the table view and then set the table view's next responder
>to your own responder. And there you go, it has been inserted in the linked
>list.
A clever solution, but it means you have to always set up some other
object to do what NSTableView should do itself. If your app has tens of
tableviews, it seems nicer to subclass and fix NSTableView, then just
use your subclass everywhere. I guess the best solution always depends
on one's situation.
Thanks to all,
--
____________________________________________________________
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