• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Properly supporting 'delete' key presses in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Properly supporting 'delete' key presses in NSTableView


  • Subject: Re: Properly supporting 'delete' key presses in NSTableView
  • From: Andy Lee <email@hidden>
  • Date: Tue, 21 Oct 2008 09:32:01 -0400

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 on another discussion thread):


<http://likethought.com/myriad/2008/04/11/a-slightly-improved-nstableview/ >
For Opacity, I put together a subclass of NSTableView that adds a few more features-specifically for handling keyboard presses. LTKeyPressTableView adds enter or return to edit a row, delete to delete the current row, and hooks to intercept left and right key presses.

It's a lightweight subclass that (at a glance) seems to take the same approach as you did, but abstracts the behavior into delegate methods.


Thought it might be worth looking at if only to compare notes.

--Andy

_______________________________________________

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


References: 
 >Properly supporting 'delete' key presses in NSTableView (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Bind an NSRect
  • Next by Date: Re: Properly supporting 'delete' key presses in NSTableView
  • Previous by thread: Re: Properly supporting 'delete' key presses in NSTableView
  • Next by thread: Re: GDB Problems
  • Index(es):
    • Date
    • Thread