KVC Validation w/ custom Formatter not working
KVC Validation w/ custom Formatter not working
- Subject: KVC Validation w/ custom Formatter not working
- From: Luc Van Bogaert <email@hidden>
- Date: Sun, 26 Feb 2017 21:40:28 +0100
Hello,
In Swift, I'm using a custom Formatter subclass on a NSTextField (in a table) in IB. The textfield value binding is bound to a property of my model class. This property is a typealiased Int. I would also like to use KVC validation for this property, so my model class overrides
validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey inKey: String) throws
After changing the text in the textfield, my validation method is not called. When I replace my custom formatter with an instance of NSNumberFormatter, everything works as expected.
Any help with this would be greatly appreciated.
--
Luc Van Bogaert
_______________________________________________
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