• 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: Making NSNumberFormatter empty-tolerant
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making NSNumberFormatter empty-tolerant


  • Subject: Re: Making NSNumberFormatter empty-tolerant
  • From: Frédéric Testuz <email@hidden>
  • Date: Thu, 27 Aug 2009 22:47:56 +0200

Le 27 août 09 à 21:46, bryscomat a écrit :

Interesting. Is that documented anywhere? That's why I was confused as to exactly how I got mine to work. Seems like a fluke...

On Aug 27, 2009, at 2:39 PM, Frédéric Testuz wrote:

I had the same problem. For the 10.4 behaviour of NSNumberFormatter, you don't have to subclass it.


Just set the nil symbol with:

[myNumberFormatter setNilSymbol:@""];

Alternatively, you can set it in IB:

In the number formatter attribute palette, go down until you see Nil Symbol, enter a character and then delete it.


Note: if only the NSDateFormatter has the same attribute.

Frédéric_______________________________________________

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:
@gmail.com


This email sent to email@hidden

I don't think I saw it written explicitly. When I had the problem, before subclassing NSNumberFormatter, I check the docs, see setNilSymbol and try to use it.
For the IB trick I can't remember how I found it. It must be something like thinking about how IB is probably archiving objects and trying some solutions.


Frédéric_______________________________________________

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: 
 >Making NSNumberFormatter empty-tolerant (From: Markus Spoettl <email@hidden>)
 >Re: Making NSNumberFormatter empty-tolerant (From: Frédéric Testuz <email@hidden>)
 >Re: Making NSNumberFormatter empty-tolerant (From: bryscomat <email@hidden>)

  • Prev by Date: Re: Making failed NSAsserts crash an app
  • Next by Date: Re: Making failed NSAsserts crash an app
  • Previous by thread: Re: Making NSNumberFormatter empty-tolerant
  • Next by thread: Launching a document-based app with no document
  • Index(es):
    • Date
    • Thread