Is it possible to make my NSTableView accept a deleteevnt (backspace og even cmd+backspace) ? I have an NSMenu where i have my delete-menu-item connected to my first responder object in the nib.
Any pointers?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could create a subclass of NSTableView, overriding
keyDownlike so:Then make sure that any NSTableView that you want to have the delete functionality uses your subclass in Interface Builder instead of the regular NSTableView.
You can implement the
- (void)deleteItemmethod for example like this: