Re: Designated Initializer
Re: Designated Initializer
- Subject: Re: Designated Initializer
- From: Richard Somers <email@hidden>
- Date: Sat, 30 Oct 2010 14:51:10 -0600
On Oct 30, 2010, at 2:17 PM, Quincey Morris wrote:
If you override designated initializer A, then call super's non-
designated initializer B, then B will call A, causing a recursion.
I just tried this exact scenario before I received your email. It
produced an infinite loop just as you predicted.
What the documentation generally describes, I believe, is a safe set
of guidelines to follow when subclasses override *designated*
initializers. That was not the case in the Hillegass case, which is
why that pattern was safe in the given scenario.
That makes sense. Thanks for the reply.
--Richard Somers
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden