The Cell from Hell (TM)
The Cell from Hell (TM)
- Subject: The Cell from Hell (TM)
- From: Glen Low <email@hidden>
- Date: Wed, 5 May 2004 16:32:00 +0800
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.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.