• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextFieldCell assertion failure messages?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSTextFieldCell assertion failure messages? (From: Erik Stainsby <email@hidden>)

  • Prev by Date: NSTextFieldCell assertion failure messages?
  • Next by Date: Re: Embedding resources in Static Cocoa Library
  • Previous by thread: NSTextFieldCell assertion failure messages?
  • Next by thread: Re: Embedding resources in Static Cocoa Library
  • Index(es):
    • Date
    • Thread