• 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: quick and dirty NSData implosion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick and dirty NSData implosion


  • Subject: Re: quick and dirty NSData implosion
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Mon, 11 May 2009 18:36:08 -0700

On May 11, 2009, at 6:11 PM, Graham Cox wrote:

On 12/05/2009, at 6:20 AM, jon wrote:

- (id)initWithCoder:(NSCoder *)c

{

	[super init];


You do not and should not call [super init] here. In this case it's harmless as it happens, but in the general case it's not. The only thing initWithCoder is obliged to call is super's -initWithCoder: and ONLY when the object is not an immediate subclass of NSObject. In this case it is, so you should remove this line.

Can you point to documentation on that? The only thing I've seen says "If the superclass of your class does not support NSCoding, you should invoke the superclass’s designated initializer instead of initWithCoder:."


http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/Archiving/Tasks/codingobjects.html#//apple_ref/doc/uid/20000948


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: quick and dirty NSData implosion
      • From: Graham Cox <email@hidden>
References: 
 >quick and dirty NSData implosion (From: Jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: Alexander Spohr <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: John Cebasek <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: Graham Cox <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: quick and dirty NSData implosion
  • Next by Date: NSAccessibilityAttributeValue exception raised when hovering mouse over top menu bar
  • Previous by thread: Re: quick and dirty NSData implosion
  • Next by thread: Re: quick and dirty NSData implosion
  • Index(es):
    • Date
    • Thread