Re: Avoiding NSTableView NSOutlineView menu row highlight
Re: Avoiding NSTableView NSOutlineView menu row highlight
- Subject: Re: Avoiding NSTableView NSOutlineView menu row highlight
- From: Corbin Dunn <email@hidden>
- Date: Fri, 18 Feb 2011 10:53:11 -0800
On Feb 18, 2011, at 9:57 AM, Markus Spoettl wrote:
> On Feb 18, 2011, at 12:00 PM, Corbin Dunn wrote:
>> You can't customize it. Please log bugs requesting that ability.
>>
>> NSTableView marks the rows to highlight in:
>>
>> - (NSMenu *)menuForEvent:(NSEvent *)theEvent
>>
>> If you override that, and don't call super, the it will suppress the highlighting.
>
> OK that's certainly an option but what does NSTableView do in -menuForEvent:? Just open the popup? Or something more elaborate.
It's more elaborate, but overriding it and providing your own menu is perfectly acceptable. FWIW, the table doesn't show the returned menu -- something else does. The table just watches it.
>
>>> In my case that is confusing and unwanted since I'm ensuring the (right-) clicked row is selected
>>
>> FWIW, that's non-standard UI. The HI specification is to not change the selected row on a right click. Note that many apps get this wrong. Finder in SnowLeopard has it correct.
>
>
> In my case the behavior is absolutely unwanted and confusing to the user. It wouldn't be if I had control over the context-highlight and could manually force rows to go into this state but as it is, it's undesirable for my particular usage.
Consider the Mail UI. It is considered bad behavior if right clicking on a non-selected row in the sidebar changed the selection, as it is "heavy weight" and has side effects. The user may want to do something, such as delete that folder, or mark all as read, without changing the selection to it. I'm just saying that changing the selection goes against the standard behavior. It's okay if you do it....just as long as you know the consequences.
corbin
_______________________________________________
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