Re: NSTextFieldCell assertion failure messages?
Re: NSTextFieldCell assertion failure messages?
- Subject: Re: NSTextFieldCell assertion failure messages?
- From: Quincey Morris <email@hidden>
- Date: Sun, 07 Oct 2012 15:11:33 -0700
On Oct 7, 2012, at 14:18 , Erik Stainsby <email@hidden> wrote:
> cellView.textField.stringValue = @" ";
> [cellView.textField bind:@"stringValue" toObject:person withKeyPath:[tableColumn identifier] options:nil];
There are several wrong or code-smelly things here:
-- Why on earth set the string to a space? It's going to make the UI behave oddly for users. If you don't want a string property to be nil, set it to @"".
-- There's no point in setting a property if the next thing you do is bind something that changes the same property. You've done the analog of 'x = 0; x = 1;' here.
-- Text fields don't have a "stringValue" binding, they only have a "value" binding:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSTextField.html
_______________________________________________
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