Re: The Cell from Hell (TM)
Re: The Cell from Hell (TM)
- Subject: Re: The Cell from Hell (TM)
- From: John Randolph <email@hidden>
- Date: Wed, 5 May 2004 14:22:50 -0700
On May 5, 2004, at 1:32 AM, Glen Low wrote:
Hi All,
Just thought I'd save some souls from hours of fruitless debugging.
(somewhat apropos given the title of this email :-) )
NSCells are the best thing since sliced bread -- a lightweight control
and everything. However, there is a subtle bug with them. If you draw
them in a view as you must, and later on the view goes away e.g. if
the window goes away, the cell now has a dangling reference to the
view!! Then most operations on it will fail with a SIGTRAP e.g.
setObjectValue, setFont, copy ... you'll need to manually flush the
dangling reference with a
[cell drawFrame: NSZeroRect inView: nil]
just to clear it up.
Ordinarily, a cell belongs to a particular view and once the view has
been dealloced, the cell doesn't exist anymore.
-jcr
_______________________________________________
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.