• 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: NSNumber bound to NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNumber bound to NSTextField


  • Subject: Re: NSNumber bound to NSTextField
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 14 Sep 2009 18:06:30 -0700

Sorry, today appears to Trip Over Your Own Tongue day for some of us. Slight corrections:

On Sep 14, 2009, at 17:59, Quincey Morris wrote:

[NSNumber alloc] always returns a subclass.

It's actually an implementation detail what [NSNumber alloc] returns. It might be some kind of placeholder object. It's more correct to say that [[NSNumber alloc] init...] always returns a subclass.


The simple solution is to add a number formatter to your text field. Then, changing the text field causes it to update the binding with a NSNumber value instead of a NSString value.

I didn't see the end of your post until too late. You already figured this part out.



_______________________________________________

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: 
 >NSNumber bound to NSTextField (From: Todd Heberlein <email@hidden>)
 >Re: NSNumber bound to NSTextField (From: Quincey Morris <email@hidden>)

  • Prev by Date: Shutdown/Restart computer
  • Next by Date: Re: Why the Cocoa function can't be called from JavaScript?
  • Previous by thread: Re: NSNumber bound to NSTextField
  • Next by thread: Shutdown/Restart computer
  • Index(es):
    • Date
    • Thread