On Aug 18, 2009, at 5:15 AM, Graham Cox wrote:


On 18/08/2009, at 9:50 PM, Graham Cox wrote:

Here's a fun little method I wrote to explore this - it just fakes an event that gradually tracks from the top of the table to the bottom. As you can see, you wouldn't really expect it to draw anything, but it does highlight each row in turn. The call to the window's -displayIfNeeded is required to flush the drawing out during the loop. <mLayersTable> is the ivar for the tableview (in fact an outline view - I haven't tested this against a table view).


<snip -- note, I did read all the replies>

Please do log bugs with regard to this -- there is no reason it can't be changed, especially if it works better for you all (the developers) to customize things. I'm always open to suggestions and improvements.


A few more clues/results...

The highlight is being drawn by drawRect: as usual - I was thinking that some direct drawing was being done but that's not the case on further investigation.

After running the test code, the table highlighting gets firmly set to the blue outline style for ALL further selections. This suggests that -menuForEvent is setting a highlighting style mode, making a note of the row to highlight and then doing the drawing in - drawRect: Am I warm, Corbin?

Yes -- that is the case. It would still have to do something similar, even if the code was moved somewhere else, but as you noted, there is an error if the menu isn't ever shown. -rightMouseDown:, or something else, may be more appropriate.

-corbin
_______________________________________________

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