Re: [swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-18 Thread Joe Groff via swift-users
> On Apr 17, 2017, at 10:11 PM, Rick Mann wrote: > >> >> On Apr 17, 2017, at 08:54 , Joe Groff wrote: >> >> >>> On Apr 14, 2017, at 7:41 PM, Rick Mann via swift-users >>> wrote: >>> >>> I'm refactoring some Objective-C code

Re: [swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-17 Thread Rick Mann via swift-users
> On Apr 17, 2017, at 08:54 , Joe Groff wrote: > > >> On Apr 14, 2017, at 7:41 PM, Rick Mann via swift-users >> wrote: >> >> I'm refactoring some Objective-C code to inherit from a new Swift super >> class. This has been going okay, and I've been

Re: [swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-17 Thread Joe Groff via swift-users
> On Apr 14, 2017, at 7:41 PM, Rick Mann via swift-users > wrote: > > I'm refactoring some Objective-C code to inherit from a new Swift super > class. This has been going okay, and I've been cleaning up build errors as I > spot them (some auxiliary enums caused enum

Re: [swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-17 Thread Rod Brown via swift-users
> On 18 Apr 2017, at 12:01 am, Rod Brown via swift-users > wrote: > > Hi Rick, > > Unfortunately, that is the case. You cannot subclass a Swift class (even if > it is a subclass of NSObject and available to the Objective-C runtime) > because of deliberate limitations

Re: [swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-17 Thread Rod Brown via swift-users
Hi Rick, Unfortunately, that is the case. You cannot subclass a Swift class (even if it is a subclass of NSObject and available to the Objective-C runtime) because of deliberate limitations baked into Obj-C to block subclassing Swift classes in Obj-C code. I believe the reason for this

Re: [swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-17 Thread Rick Mann via swift-users
> On Apr 14, 2017, at 22:33 , Guillaume Lessard > wrote: > > Your class probably needs to be declared as open. > > @objc open class Camera : NSObject {} Thanks. Sadly, that does not fix it. > Guillaume Lessard > >> On Apr 14, 2017, at 20:41, Rick Mann via

[swift-users] Cannot subclass a class with objc_subclassing_restricted attribute

2017-04-14 Thread Rick Mann via swift-users
I'm refactoring some Objective-C code to inherit from a new Swift super class. This has been going okay, and I've been cleaning up build errors as I spot them (some auxiliary enums caused enum name changes, etc.). But my last error seems to be that I can't subclass the Swift class: "Cannot