On Jun 23, 2014, at 17:30 , Graham Cox <graham....@bigpond.com> wrote:

> I interpret that to mean it must call a designated initializer *eventually*, 
> not necessarily directly. Since all -initXXX methods of the superclass must 
> call the superclass's designated initializer, your subclass's D.I. can call 
> any of the superclass's -initXXX methods.

Actually, I understood the thrust of Sean’s question as being that 
NSWindowController’s initializers don’t follow Swift rules.

If you look in the Swift book, you’ll see that convenience constructions may 
only call “across” (that is, call an initializer in the same class), while 
designated constructors may only call “up” (to a *designated* initializer in 
the superclass).

In that regard, ‘initWithWindowNibName:’ must be a designated initializer, 
since subclasses that don’t do their own nib loading have nothing else to call 
“up” to.

I assume, therefore, that ‘initWithWindowNibName:’ is marked as a designated 
initializer in 10.10, though I haven’t looked to check this.

_______________________________________________

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

Reply via email to