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 (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 [EMAIL PROTECTED]

Reply via email to