Re: quick and dirty NSData implosion
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