Ok with programmatic bindings, I have:
1. <NSTableViewDelegate, NSTableViewDataSource> on the interface.
2. In set up:
NSButtonCell *recCell11 = [NSButtonCell new];
[recCell11 setButtonType:NSSwitchButton];
[recCell11 setTitle:NULL_STRING];
[recCell11 setImagePosition:NSImageOnly];
[recCell11 setEditable:YES];
[[transTableView tableColumnWithIdentifier:@"11"]setDataCell:recCell11];
[[transTableView tableColumnWithIdentifier:@"11"]setEditable:YES];
Plus my bindings in all columns.
3. Also, in set up:
[transTableView setDelegate:self];
[transTableView setDataSource:self];
4. Later in the code:
- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row
{
if (tableView) {
if (row >=0) {
return YES;
}
}
return YES;
}
5. Commented Out in the code:
/*
- (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn
*)tableColumn row:(NSInteger)row
{
NSLog(@"shouldEditTableColumn");
if ([tableView tag] == 10 ) {
if (([tableColumn identifier] == @"11") && (row >= 0)) {
return YES;
} else {
return NO;
}
}
return NO;
}
*/
and 6. My:
- (void)tableView:(NSTableView *)tableView setObjectValue:(id)object
forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
which works just fine.
So it appears that I don’t need shouldEditTableColumn because of the bindings.
Where is this in the docs? (rather than random cocoa sources).
If I take out the following:
- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row
{
if (tableView) {
if (row >=0) {
return YES;
}
}
return YES;
}
I can’t select any row. So it would appear that some of the table view methods
operate independently of the bindings. Where is this documented?
Best regards,
John MacMullin
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]