I was trying to make one of the nstextfieldcell unselected for a particular condition. I have attached the sample code:
-(void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row{
if(tableView == resizeTV){
if([[tableColumn identifier] isEqualToString:@"Name"]){
if([[cell stringValue] isEqualToString:@"Cate"]){
[cell setSelectable:FALSE];
}
}
}
}
The cell is still being selected on checking the condition. I have binded the tableview to the class name for tabledatasource and datadelegate. I still can select the cell. Am I doing it wrong?