• 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: NSTableView behavior changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView behavior changes


  • Subject: Re: NSTableView behavior changes
  • From: Harry Plate <email@hidden>
  • Date: Wed, 18 Mar 2009 11:18:56 -0700
  • Thread-topic: NSTableView behavior changes

Matt,

<snip>
>> 1) I defined my controller class:
>>    @interface MCController : NSResponder
>>
>> 2) I then defined (void)deleteBackward:(id)
>>
>> 3) in -awakeFromNib, I set my controller as 1st responder:
>>
>>    [sourceTableView setNextResponder:self]
>
> Instead of 2, define keyDown and check to see if ([[theEvent characters]
> isEqualToString: @"\177"]).
>

After more googling last night, I found similar suggestions; in fact I ended
up subclassing the NSTableView, and overriding keyDown:

This worked very nicely.

One problem that still troubles me is I cannot seem to trap <cmd>A - I was
hoping to implement a "select all" functionality for my "uneditable" table
view. I can get <option>A, or <control>A --- but it appears that someone
else swallows the <cmd>A

Still researching that issue...


BTW, couldn't the same thing be done for an NSTextView? Ie, override the
keyDown: method to get the "delete" functionality that I was striving for
above?


Comments appreciated!

-harry


_______________________________________________

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

  • Follow-Ups:
    • Re: NSTableView behavior changes
      • From: Raleigh Ledet <email@hidden>
References: 
 >Re: NSTableView behavior changes (From: Matt Neuburg <email@hidden>)

  • Prev by Date: [Q] Contextual Menu Items Size
  • Next by Date: Re: Get the list of Places in Finder?
  • Previous by thread: Re: NSTableView behavior changes
  • Next by thread: Re: NSTableView behavior changes
  • Index(es):
    • Date
    • Thread