• 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
Subclassing NSCell (was Re: Problem With implementing copyWithZone)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Subclassing NSCell (was Re: Problem With implementing copyWithZone)
      • From: Paul Robinson <email@hidden>
References: 
 >Problem With implementing copyWithZone (From: Thaddeus Cooper <email@hidden>)
 >Re: Problem With implementing copyWithZone (From: Chris Hanson <email@hidden>)
 >Re: Problem With implementing copyWithZone (From: Thaddeus Cooper <email@hidden>)

  • Prev by Date: Re: NSManagedObject class method error
  • Next by Date: Re: Running Shell Script from Cocoa Application
  • Previous by thread: Re: Problem With implementing copyWithZone
  • Next by thread: Re: Subclassing NSCell (was Re: Problem With implementing copyWithZone)
  • Index(es):
    • Date
    • Thread