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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to