Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView rows and delete key



On Thu, 25 Jul 2002 17:05:04 +0200, =?ISO-8859-1?Q?Rapha=EBl_Delcroix?=
<email@hidden> said:

>I can't find anything in the NSTableView documentation about this,

Then you didn't look far enough up the class hierarchy. Always remember to
do that.

>I would like that, if a row (or rows) is/are selected (so if the table
>view is the current key view, if I understand well),
>if the user presses the backspace button on keyboard, it deletes the
>row(s) concerned.

It sounds like you want to say e.g.

- (void)keyDown:(NSEvent*)theEvent {
if ([[theEvent characters] isEqualToString: @"\177"]) { // or whatever
...

You can insert that at any point in the responder chain. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.