I'm not sure what the problem is but declaring a typealias and using that
in the CBLModel subclass doesn't throw the compiler error.
typealias CBLDoc = CBLDocument
class Profile: CBLModel {
override init!(document: CBLDoc) {
super.init(document: document)
}
}
On Monday, 15 September 2014 21:37:37 UTC+1, Julian Paas wrote:
>
> Does anyone know how to override initWithDocument on CBLModel subclasses?
> I have tried as:
>
> init(document: CBLDocument!) {
>
> super.init(document)
> }
>
> But it tells me "use of undeclared type CBLDocument". CBLDocument is
> definitely not unknown I use it in plenty of other swift classes. It only
> seems to be in my CBLModel subclass that it is unknown. I get the same
> result if I declare
>
>
> var x: CBLDocument?
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/e3fcd4f0-e9f9-4d8d-a303-b2a4b1cea725%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.