• 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
X.4 formatters behaviour and nil value ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

X.4 formatters behaviour and nil value ?


  • Subject: X.4 formatters behaviour and nil value ?
  • From: Frédéric Testuz <email@hidden>
  • Date: Sun, 4 Dec 2005 11:42:25 +0100

Hello,

With X.4, I want use the new NSDateFormatter behaviour (it works better with user preferences). But I have a problem.

At the nib opening, I'm doing :

dateFormatter=[dateField formatter];
// dateField is connected to a NSTextField with a NSDateFormatter
[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[dateFormatter setDateStyle:NSDateFormatterShortStyle];

And it works.

But after putting a date in dateField, I can't delete it. With the old behaviour, the formatter returns nil for an empty string. The new behaviour returns an error.

Is there a setting in NSDateFormatter to get nil for an empty or nil string ? With NSNumberFormatter, there is setNilSymbol: but I saw nothing for NSDateFormatter.

Frédéric _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: X.4 formatters behaviour and nil value ?
      • From: Frédéric Testuz <email@hidden>
  • Prev by Date: Re: NSString's compare:options: and NSNumericSearch. Huh?
  • Next by Date: Re: CoreData - large data set is slow to load on app launch - optimization tips?
  • Previous by thread: Re: Bindings and Collections
  • Next by thread: Re: X.4 formatters behaviour and nil value ?
  • Index(es):
    • Date
    • Thread