Re: NSOutlineView retaining/releasing data cell
Re: NSOutlineView retaining/releasing data cell
- Subject: Re: NSOutlineView retaining/releasing data cell
- From: Darrin Cardani <email@hidden>
- Date: Fri, 28 May 2004 10:52:35 -0500
At 8:51 PM -0700 5/27/04, Pete Yandell <email@hidden> wrote:
On 28/05/2004, at 1:48 AM, Darrin Cardani wrote:
I'm seeing something I don't understand. I have an NSOutlineView, and
I've subclassed NSTableColumn to create a custom column so I can put
different types of data cells in it for each row. One of the cells is
a custom cell I've implemented myself, and it creates an NSArray of
NSImages when it is initialized. However, the custom NSCell's dealloc
method is getting called too soon, and I can't figure out why.
From memory, NSTableView and NSOutlineView tend to make duplicates of
the cells they use at weird times. Your cell needs to implement the
NSCopying protocol, or you'll run into trouble.
Yep, that did it!
Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<
http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.