• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Designated Initializer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Designated Initializer (From: Richard Somers <email@hidden>)
 >Re: Designated Initializer (From: Dave Carrigan <email@hidden>)
 >Re: Designated Initializer (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Designated Initializer
  • Next by Date: Content types processable by an application
  • Previous by thread: Re: Designated Initializer
  • Next by thread: Re: Designated Initializer
  • Index(es):
    • Date
    • Thread