Re: NSDateFormatter not validating input
Re: NSDateFormatter not validating input
- Subject: Re: NSDateFormatter not validating input
- From: Joakim Danielson <email@hidden>
- Date: Wed, 30 Jun 2004 11:41:11 +0200
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.