NSTextFieldCell assertion failure messages?
NSTextFieldCell assertion failure messages?
- Subject: NSTextFieldCell assertion failure messages?
- From: Erik Stainsby <email@hidden>
- Date: Sun, 07 Oct 2012 14:18:01 -0700
Can anyone tell me what I ought to be doing in response to the following message?
*** Assertion failure in -[NSTextFieldCell _objectValue:forString:errorDescription:], /SourceCache/AppKit/AppKit-1187.34/AppKit.subproj/NSCell.m:1532
This is cropping up in a table delegate/datasource when I bind: the textField in an NSTableViewCell to my model object.
Each model object has three fields and any of them may be empty. So in my tableView:viewForColumn:row: method I set each of the textFields' stringValue: to @" " before binding it to it's object.
- (NSView*) tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
RSPerson * person = (RSPerson*)[self.personAC.content objectAtIndex:row];
NSTableCellView * cellView = [tableView makeViewWithIdentifier:[NSString stringWithFormat:@"%@Cell",[tableColumn identifier]] owner:self];
cellView.textField.stringValue = @" ";
[cellView.textField bind:@"stringValue" toObject:person withKeyPath:[tableColumn identifier] options:nil];
return cellView;
}
Any advice appreciated.
Erik Stainsby
email@hidden
_______________________________________________
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