• 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: Weird deallocation of custom cell class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Weird deallocation of custom cell class (From: Lars Hoss <email@hidden>)

  • Prev by Date: Programming Topics and PDF
  • Next by Date: Re: Dot View app compiles but some functions do not work, possibly because of 10.1
  • Previous by thread: Weird deallocation of custom cell class
  • Next by thread: NSGlyph, NSBezierPath questions
  • Index(es):
    • Date
    • Thread