How does NSTableView decide to tell an NSCell to highlight on and after mouseDown?
How does NSTableView decide to tell an NSCell to highlight on and after mouseDown?
- Subject: How does NSTableView decide to tell an NSCell to highlight on and after mouseDown?
- From: Skylar Woodward <email@hidden>
- Date: Fri, 10 Oct 2003 23:49:07 -0700
I'm noticing some inconsistent behavior in the way NSTableView sets the
isHighlighted flag for an NSCell.
First of all, there is the quirk that NSTableView copies a cell anytime
it wants it to track an event (like mouseDown). When
it does copy that cell it appears to magically set its isHighlighted
flag without using any of the public APIs such as setHighlighted or
highlight:withFrame:inView.
When the event is done tracking, NSTableView destroys the tracking cell
and redraws the shared cell for the column. Before doing the redraw
however it throws in another quirk... if the cell is a subclass of
NSButtonCell, it sets its highlighting flag to false. Regular NSCells
have highlighting set to true... presumably to reflect the fact that
(due to a mouseDown action) the current row the cell is in is
Highlighted.
My question is twofold. First, how is it that NSTableView sets the
highlighting flag? Am I missing a special table/cell mechanism or
relationship? Secondly, why does NSTableView appear to discriminate
between setting highlighting flags for different types of cells? (I am
assuming it is a "feature" to make switch buttons and such work in
tables , but the inconsistency bugs me.) =)
Thanks,
skylar
===================
Skylar Woodward
Yahoo!, Inc.
_______________________________________________
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.