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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to