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

  • Paul --

    It works wonderfully well. :-)

    Thanks very much.

    Thaddeus O. Cooper
    (<tcooper...>)

    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
    >> (<tcooper...>)
    >>
    >>
    >>
    >> 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
    >>>
    >>>
    >>
    >
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today