• 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: app delegate +initialize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: app delegate +initialize


  • Subject: Re: app delegate +initialize
  • From: Dave Keck <email@hidden>
  • Date: Wed, 23 Sep 2009 12:55:41 -1000

> Does your class have a subclass, which also has a +initialize method, which
> doesn't call [super initialize]? That might cause this sort of behavior,
> because the order in which the classes load may be indeterministic.

That's unnecessary - by the time that you got around to calling [super
initialize], the runtime would have already done it for you.
+initialize is special in that the runtime automatically sends it to
every class before it's first used, and superclasses receive it before
their subclasses. From the docs:

"Superclasses receive this message before their subclasses."

"Since the runtime sends appropriate initialize messages
automatically, you should typically not send initialize to super in
your implementation."
_______________________________________________

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: 
 >app delegate +initialize (From: John Baldwin <email@hidden>)
 >Re: app delegate +initialize (From: Dave Keck <email@hidden>)
 >Re: app delegate +initialize (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Exit screen saver programmatically?
  • Next by Date: Re: [__NSFastEnumerationEnumerator nextObject] unexpectedly not very fast!
  • Previous by thread: Re: app delegate +initialize
  • Next by thread: Re: app delegate +initialize
  • Index(es):
    • Date
    • Thread