I have an older MacOS app that uses cell based tableviews. I am in the process of converting them to view based but hit a snag. When a cell based table ends editing the table view is sent as the object of the notification but when a view based table its the text field.
My code currently checks which table view is sending the notification and updates needed objects. If I switch to view based tables it looks like I'll have to assign tags to each cell view in order to identify it. Is there any way to get the table view for the textfield that ended editing?
Here's what my current code looks like...
-(void)controlTextDidEndEditing:(NSNotification *)aNotification
{
NSControl *theControl = [aNotification object];
if (theControl == [self myColorTableView])
{
[[[[self myColorArrayController] selectedObjects] objectAtIndex:0] updateMe];
}
}