Mailing Lists: Apple Mailing Lists

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

NSTableView delete button



I have an NSTableView bound to an array of NSDictionary objects. I want to add a table column containing a delete button. That will remove the object in the row of the button.

I've read http://www.cocoadev.com/index.pl?NSButtonCellInBoundColumn but it didn't really help me. I'm catching one of the table's delegate methods and this is what I have so far. Any help would be appreciated.

- (void) tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(int)row {
if ([[tableColumn identifier] isEqualToString:@"deleteButton"]) {
id dayOff = [[daysOffController arrangedObjects] objectAtIndex:row];

[cell setHighlightsBy:NSContentsCellMask];
}
}
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden


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.