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

Re: Subclassing NSCell (was Re: Problem With implementing copyWithZone)


  • Subject: Re: Subclassing NSCell (was Re: Problem With implementing copyWithZone)
  • From: Thaddeus Cooper <email@hidden>
  • Date: Mon, 8 Oct 2007 14:02:23 -0700

Paul --

It works wonderfully well. :-)

Thanks very much.

Thaddeus O. Cooper
(email@hidden)



On Oct 8, 2007, at 1:50 PM, Paul Robinson wrote:


No problem! Let me know if it works.

cheers,
Paul


On 8-Oct-07, at 4:41 PM, Thaddeus Cooper wrote:

Paul --

I just read your blog posting. Thank you very much. I will try this. :-)

Thanks.

Thaddeus O. Cooper
(email@hidden)



On Oct 8, 2007, at 1:32 PM, Paul Robinson wrote:

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.


I also recently ran across the mysterious missing copyWithZone: when trying to use a custom NSCell with NSManagedObjects.


I blogged about it at:
http://kupuk.com/2007/10/08/custom-nscells-with-nsmanagedobjects/

The short answer is that you need to override the setObjectValue: method (which tries to copy your uncopyable NSManagedObject) in your custom NSCell to convert your NSManagedObject into an NSValue (which is copyable).

Paul





_______________________________________________

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


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>)
 >Subclassing NSCell (was Re: Problem With implementing copyWithZone) (From: Chris Hanson <email@hidden>)
 >Re: Subclassing NSCell (was Re: Problem With implementing copyWithZone) (From: Thaddeus Cooper <email@hidden>)

  • Prev by Date: DEUG vs RELEASE
  • Next by Date: Re: DEUG vs RELEASE
  • Previous by thread: Re: Subclassing NSCell (was Re: Problem With implementing copyWithZone)
  • Next by thread: Using NSScrollView with self clipping views?
  • Index(es):
    • Date
    • Thread