changing string in a view based NSTableView
changing string in a view based NSTableView
- Subject: changing string in a view based NSTableView
- From: Koen van der Drift <email@hidden>
- Date: Sat, 07 Jul 2012 16:44:22 -0400
I'd like to change the change the string that is displayed in my view based NSTableView to a lowercase string. So I implemented the following in the delegate of the tableview:
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
MyTableCellView *result = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
NSString *key = result.keyTextField.stringValue;
result.keyTextField.stringValue= [key.stringValue lowercaseString];
return result;
}
keyTextField is an outlet in my custom NSTableCellView. The code gets called, but the string is not affected, because key is an empty string. All valuables are visible in the table view, so everything else seems to be hooked up correctly (using bindings).
If I change one line to:
result.keyTextField.stringValue = @"Test";
Only a few of the rows will show the word Test, all others will show the value set by the bindings
What am I missing?
Thanks,
- Koen.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden