From the NSCopying protocol reference: If a subclass inherits NSCopying from its superclass and declares additional instance variables, the subclass has to override copyWithZone: to properly handle its own instance variables, invoking the superclass’s implementation first.
There are many other good tidbits of info in there, check it out and hopefully it will cover what you want to know. Doug Hill > On Feb 29, 2016, at 6:58 AM, Dave <d...@looktowindward.com> wrote: > > Hi, > > I have an inheritance chain Classes that are NSCoding and NSCopying compliant > like so: > > > @interface LTWBaseClass : NSView <NSCoding,NSCopying> > > @interface LTWSubclassA : LTWBaseClass <NSCoding,NSCopying> > > @interface LTWSubclassB : LTWSubclassA <NSCoding,NSCopying> > > Each of these three classes contain properties that need to be archived and > unarchived. In initWithCoder and encodeWithCoder methods I call [super > initWithCoder] and [super encodeWithCoder], but I’m not sure what to do for > copyWithZone? Do I need to call the super version of this method too? > > Thanks a lot, All the Best > Dave _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com