You are correct that your text field should be editable in Interface Builder.
Then so that your controller matches NSTextFieldDelegate. Then set the delegate for the text field to outlineView: viewForTableColumn: item :, like so:
tableCellView.textField.delegate = self
Here's a simplified example where you have implemented a method to return a table cell view for an item for your plan.
-(NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item { NSTableCellView *tableCellView = [outlineView makeViewWithIdentifier:@"myTableCellView" owner:self]; MyItem *myItem = (MyItem *)item;
Then the controller should receive a controlTextDidEndEditing notification:
- (void)controlTextDidEndEditing:(NSNotification *)obj { NSTextField *textField = [obj object]; NSString *newTitle = [textField stringValue]; NSUInteger row = [self.sidebarOutlineView rowForView:textField]; MyItem *myItem = [self.sidebarOutlineView itemAtRow:row]; myItem.name = newTitle; }
source share