Handler not called on table cell edit
Handler not called on table cell edit
- Subject: Handler not called on table cell edit
- From: Ken Tozier <email@hidden>
- Date: Mon, 13 Oct 2008 02:13:10 -0400
Hi
I have a dynamically created table with one editable column (page
number), but when I change the number and hit "return", my assigned
handler never gets called.
Here's how the cell is defined:
pageCell = [[NSTextFieldCell alloc] init];
[pageCell setEditable: YES];
[pageCell setTarget: self];
[pageCell setAction: @selector(handlePageNumberChange:)];
Here's where it's added to the "page number" column:
pageColumn = [[NSTableColumn alloc] initWithIdentifier: @"page"];
[pageColumn setWidth: 20];
[pageColumn setMinWidth: 20];
[pageColumn setMaxWidth: 20];
[pageColumn setDataCell: pageCell]; // <- CELL ADDED HERE
[pageColumn bind: @"value" toObject: self withKeyPath:
@"pages.pageNumber" options: nil];
And here's the hander:
- (void) handlePageNumberChange:(id) inSender
{
NSLog(@"handlePageNumberChange: %@", inSender);
}
Seems like it should be pretty straightforward. Anyone see what I'm
doing wrong?
Thanks for any help
_______________________________________________
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