Hi Josh,

Be sure to not draw outside the cell bounds passed to you in the drawXXRect: 
method on the cell.

corbin

On Apr 19, 2011, at 8:56 AM, Joshua Garnham wrote:

> Normally my code doesn't care when or how often willDisplayCell: is called 
> and 
> is in fact called more often than in a normal table view as my code 
> highlights 
> the cell that the mouse is over.
> 
> The odd thing is on this occasion the background which I draw for the 
> highlighted cell actually draws over everything else rather than going behind 
> it.
> 
> Obviously as this happens normally due to the tooltip, I will have to 
> investigate as to why the problem occurs and possibly consider where I do the 
> drawing.
> 
> Thanks for your help,
> Josh
> 
> 
> ________________________________
> From: Kyle Sluder <kyle.slu...@gmail.com>
> To: Joshua Garnham <joshua.garn...@yahoo.co.uk>
> Cc: "cocoa-dev@lists.apple.com" <cocoa-dev@lists.apple.com>
> Sent: Tue, 19 April, 2011 16:02:17
> Subject: Re: NSTableView willDisplayCell: called on hover
> 
> On Apr 19, 2011, at 7:35 AM, Joshua Garnham <joshua.garn...@yahoo.co.uk> 
> wrote:
> 
>> So my question really is, why does willDisplayCell: get called after a 3 sec 
>> hover, is this a bug? and is there anyway around it?
> 
> It probably gets called to draw the tooltip expansion cell. If there is a bug 
> here, it's that willDisplayCell: doesn't get called after the window is 
> reopened.
> 
> You need to fix your code so that it doesn't care when or how often 
> willDisplayCell: is called. You should not be doing much if any meaningful 
> work 
> in this method.
> 
> --Kyle Sluder
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com
> 
> This email sent to corb...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to