Re: Customised NSCell leaves dirty traces while scrolling

2010-11-24 Thread Jerry Krinock
On 2010 Nov 24, at 01:08, Josh Yu wrote: > Problem solved. > > NEVER return float to heightOfRow - this will mess the whole table up. > Not sure if it's a cocoa bug - but return integer at all times. I presume you're speaking of the value returned by the delegate method -tableView:heightOfRow:

Re: Customised NSCell leaves dirty traces while scrolling

2010-11-24 Thread Josh Yu
>> Try overriding NSCell - drawWithFrame:inView: >> IIRC this is called before - drawInteriorWithFrame:InView: >> The default implementation of - drawWithFrame:inView: is perhaps the source >> of your unwanted drawing. >> Regards >> Jonathan Mitchell >Thanks Jonathan for your reply. I've tried

Re: Re: Customised NSCell leaves dirty traces while scrolling

2010-11-21 Thread Josh Yu
> Try overriding NSCell - drawWithFrame:inView: > IIRC this is called before - drawInteriorWithFrame:InView: > The default implementation of - drawWithFrame:inView: is perhaps the source > of your unwanted drawing. > Regards > Jonathan Mitchell Thanks Jonathan for your reply. I've tried replac

Re: Customised NSCell leaves dirty traces while scrolling

2010-11-21 Thread jonat...@mugginsoft.com
On 20 Nov 2010, at 07:24, Josh Yu wrote: > > > 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 > ___ > Try

Customised NSCell leaves dirty traces while scrolling

2010-11-21 Thread Josh Yu
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 NSTabl