Subclassing NSCell (was Re: Problem With implementing copyWithZone)
Subclassing NSCell (was Re: Problem With implementing copyWithZone)
- Subject: Subclassing NSCell (was Re: Problem With implementing copyWithZone)
- From: Chris Hanson <email@hidden>
- Date: Mon, 8 Oct 2007 09:23:53 -0700
On Oct 7, 2007, at 8:16 PM, Thaddeus Cooper wrote:
I am only implementing copyWithZone: because it is required for the
composite NSCell subclass that I am working on which combines
multiple pieces of data from an NSManagedObject subclass into a
single cell, so I believe that I want an absolute duplicate of what
is already in the store.
In implementing an NSCell subclass, you do need to consider how to
handle the NSCopying and NSCoding protocol methods. However, you
shouldn't need to copy the value of the cell, only the cell itself.
(After all, the NSCell value properties like objectValue are
implemented by NSCell, so any copying of them would be handled by
NSCell itself if it was actually desired.)
-- Chris
_______________________________________________
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