Re: bug in PhotoSearch
Re: bug in PhotoSearch
At 4:38 PM -0700 7/25/08, Corbin Dunn wrote:
On Jul 25, 2008, at 3:52 PM, email@hidden wrote:
also, is there a specific reason for caching the cell in
iMouseCell? i've done away with the caching in my app (and thus
also don't have to override preparedCellAtColumn:row:), and now all
my problems have gone away? my guess is that u were caching the
cell for performance reasons... is that correct? or am i opening
myself up for a future problem?
Yes; tableview uses a single cell to "stamp" out each row in a given
column. you might have trouble with the properties getting set if
something else triggers that cell on a different row to redraw while
the mouse is over the current cell.
corbin,
first off. thanx for your replies and for the demo!
i thought i understood this, but the more i thought about it, the
less i understood!
it seems to me that all drawing of table cells will go first thru
preparedCellAtColumn:row:, next to the delegate method
tableView:willDisplayCell:forTableColumn:row:, then thru the table's
drawRect: and finally to the appropriate cell's drawing methods
(altho i may have the order wrong, and it may be that drawRect calls
preparedCellAtColumn:row,
tableView:willDisplayCell:forTableColumn:row:, and the cell's drawing
methods). since the sample code's (and my) mouse entered/exit methods
simply indicate that the cell rect needs to be displayed, drawing
caused by entering/exiting a cell's tracking area will go thru the
same sequence. (is this correct?) thus, unless some cell drawing is
done outside the normal mechanism (via some direct draws or draws
from another thread), there should be no reason to cache the cell.
so... (since i readily grant that u have much more knowledge than i
do), what am i missing? :-)
thanx,
ken
_______________________________________________
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