Re: Weird deallocation of custom cell class
Re: Weird deallocation of custom cell class
- Subject: Re: Weird deallocation of custom cell class
- From: Matt Rollefson <email@hidden>
- Date: Fri, 7 Dec 2001 10:28:44 -0800
You most likely need to add support for copying to your custom cell, as
that's how NSOutlineView handles replicated cells. See the documentation
in the NSCopying protocol for details of how to support NSCopying in a
subclass of a class that already supports NSCopying.
Rollie
On Friday, December 7, 2001, at 01:51 AM, Lars Hoss wrote:
Hi!
I'm facing a very weird problem and perhaps someone can help me.
I have written a class that extends from NSTextFieldCell. I told
NSOutlineView
to use this class for the first column:
myCell = [[MyNSTextFieldCell alloc] init];
[myCell setFolderIcon: folderIcon];
col = [outlineView tableColumnWithIdentifier:@"filename"];
[col setDataCell:myCell];
Now, when the application starts everything seems to be fine at first.
But when I click on an entry in the first column my app crashes.
I found out that the myCell instance receives a dealloc message
right after clicking on a cell in the first column.
It seems to make no sense to send a dealloc message here?
Thanks for you help in advance.
Lars
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev