The parameter-less version of “init” in NSDocument can’t throw. It’s suggesting to (save the error somehow and then) throw the error from one of the other initializers. This counts on the fact that you won’t initialize a NSDocument (subclass) instance with no parameters, but call one of the others, which calls “init()”.
But I can’t call the “super” versions of those other initializers from within my override. In fact, I can’t create overrides of them; the Swift compiler won’t auto-complete and insists that I mark them as “convenience” initializers. And I am limited to my “self.init()” call to start them up. Do I have to manually recreate the algorithm for each initializer overload(?)? Will NSDocumentController and other parts of the framework see my “overrides” of the standard NSDocument initializers and use them instead? Or should I just forget about throwing errors from “init()”? I could just call “fatalError” or similar instead. (Oh, I got error objects because I’m initializing my (per-document) Core Data stack in “init()”.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com _______________________________________________ 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