Customised NSCell leaves dirty traces while scrolling
Customised NSCell leaves dirty traces while scrolling
- Subject: Customised NSCell leaves dirty traces while scrolling
- From: Josh Yu <email@hidden>
- Date: Sat, 20 Nov 2010 18:24:31 +1100
Hey guys I was implementing a customised NSCell into NSTableView and
it leaves dirty traces while scrolling up bit by bit.
The cell was subclassed from NSTextFieldCell, using
drawInteriorWithFrame: and coordinates to locate and place elements
inside (drawInRect for NSStrings whatever).
The NSTableView calls cells via dataCellForTableColumn:row: and passes
the current cell frame boundary NSRect to cells for drawing.
It looked all well and neat except for sometimes leaving dirty traces
while scrolling up slowly bit by bit. The capture below sketches the
problem as dirty bits are lying under the first "retweet by retweet
by" as a result of scrolling up.
[ Image: http://img89.imageshack.us/img89/3644/20101120060934.png ]
A call to NSTableView setNeedsDisplay:YES will always solve the
problem however too inefficient.
Can anyone please suggest if there's anything might be done to fix that up?
kjoika
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden