Re: Validating NSButton in Swift

2015-12-13 Thread Roland King
> On 14 Dec 2015, at 15:42, Luc Van Bogaert wrote: > > class ValidatedButton: NSButton, ValidatedControl { > > > I've defined ValidatedControl like this: > > protocol ValidatedControl: NSValidatedUserInterfaceItem { > > > This results in a compiler error: Type ValidatedButton does not confo

Re: Validating NSButton in Swift

2015-12-13 Thread Luc Van Bogaert
> On 14 Dec 2015, at 00:18, Quincey Morris > wrote: > > On Dec 13, 2015, at 14:59 , Luc Van Bogaert > wrote: >> >> I have a NSButton subclass that I want to conform to >> NSValidatedUserInterfaceItem, so I can call validateUserInterfaceItem: on a >> validator p

Re: Validating NSButton in Swift

2015-12-13 Thread Quincey Morris
On Dec 13, 2015, at 14:59 , Luc Van Bogaert wrote: > > I have a NSButton subclass that I want to conform to > NSValidatedUserInterfaceItem, so I can call validateUserInterfaceItem: on a > validator passing the button as a parameter. This requires my subclass to > implement two methods: action(

Validating NSButton in Swift

2015-12-13 Thread Luc Van Bogaert
Hello, I'm trying to rework some working Objective-C code to validate my user interface items to Swift. I have a NSButton subclass that I want to conform to NSValidatedUserInterfaceItem, so I can call validateUserInterfaceItem: on a validator passing the button as a parameter. This requires my