Re: KVC Validation w/ custom Formatter not working

2017-03-03 Thread Luc Van Bogaert
The formatting with the custom formatter is working. Due to a misunderstanding on my part, I was incorrectly assuming that the validation method was not called. Actually, that is only the case when the formatter returns "false" from its getObjectValue(:for:errorDescription:) method, which I gues

Re: KVC Validation w/ custom Formatter not working

2017-02-27 Thread Quincey Morris
On Feb 26, 2017, at 12:40 , Luc Van Bogaert wrote: > > my model class overrides > > validateValue(_ ioValue: AutoreleasingUnsafeMutablePointer, > forKey inKey: String) throws > > After changing the text in the textfield, my validation method is not called. > When I replace my custom formatte

KVC Validation w/ custom Formatter not working

2017-02-26 Thread Luc Van Bogaert
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 validate