> On 14 Dec 2015, at 15:42, Luc Van Bogaert <luc.van.boga...@me.com> wrote: > > class ValidatedButton: NSButton, ValidatedControl { > > > I've defined ValidatedControl like this: > > protocol ValidatedControl: NSValidatedUserInterfaceItem { > > > This results in a compiler error: Type ValidatedButton does not conform to > protocol NSValidatedUserInterfaceItem. > I've tried overriding the NSControl properties 'action' and 'tag', but the > error remains.
You appear to be a little out of luck here because NSValidatedUserInterfaceItem requires two *functions* public func tag()->Int public func action()->Selector however NSControl implements two *properties* public var tag : Int { get set } public var action : Selector { get set } and even though the getter for those has the same signature you can’t substitute one for another. Nor can you add a function on the subclass which shadows the equivalently-named property on the superclass so .. it rather looks like you can’t do it. Can you declare this small piece of it in ObjC and import the classes, while Apple considers the bug report you will no-doubt file on it. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com