• 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: NSDateFormatter not validating input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDateFormatter not validating input


  • Subject: Re: NSDateFormatter not validating input
  • From: Joakim Danielson <email@hidden>
  • Date: Wed, 30 Jun 2004 11:54:46 +0200

Sorry about the stupid link. This should work better.

http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/Validation.html#//apple_ref/doc/uid/20002173

Joakim

On 2004-06-30, at 11.41, Joakim Danielson wrote:

I just tested your problem in my application and it seems like the key-value validation method gets called before any formatting occurs. So if your class is KVC compliant, just implement a validate<key> method in your class and validate the date there. If your using bindings you can check 'Validates immediately' in the info panel otherwise you have to call the method yourself.

See file:///Developer/Documentation/Cocoa/Conceptual/KeyValueCoding/ Concepts/Validation.html#//apple_ref/doc/uid/20002173 for a better description of key-value validation.

In my personal opinion this validation should be performed by NSDateFormatter directly.

Joakim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSDateFormatter not validating input (From: David Alter <email@hidden>)
 >Re: NSDateFormatter not validating input (From: Joakim Danielson <email@hidden>)

  • Prev by Date: Re: NSDateFormatter not validating input
  • Next by Date: Outline View losing its rightmost column
  • Previous by thread: Re: NSDateFormatter not validating input
  • Next by thread: Using GCContextFillRect() vs. NSBezierPath's class methods
  • Index(es):
    • Date
    • Thread