HIG, right click issue
Peter Haworth
pete at lcsql.com
Mon Aug 20 13:26:43 EDT 2012
Thanks for the insight Richard.
At one point, I tried to mimic the OS X behavior for shooing a different
highlight for right click than left click but didn't really like the result
as regards my particular application.
I also tried setting the hilite of a right-clicked line but ran into some
problems. I couldn't figure out how to tell if the user wanted to add the
right-clicked line to the already-selected lines or wanted to select just
that line. My solution to that was to clear all the hilitedlines after
whatever action the user selected was completed, but that wasn't entirely
satisfactory either.
For now, I think I'll leave it the way it is - user selects all the
required lines by the normal methods, then right-clicks on any of them to
get the popup menu. One extra click shouldn;t hurt.
Pete
lcSQL Software <http://www.lcsql.com>
PS Did you get my email re 4WProps?
On Mon, Aug 20, 2012 at 7:33 AM, Richard Gaskin
<ambassador at fourthworld.com>wrote:
> Maybe. It seems that the target object is a matter of design objective,
> and varies from implementation to implementation.
>
> For example, in OS X's Finder list view, right-clicking preserves the
> original selection while also providing a context menu for the specific
> item in the list being right-clicked on, rather than for the list as a
> whole. It's kind of a weird implementation, actually, since they use a
> different hilite indication for things right-clicked as opposed to
> left-clicked, and I've seen some cases where the right-click doesn't
> indicate its selection at all, even though the item-specific menu appears
> as expected.
>
> In one of the apps I manage we also had a similarly legitimate need to
> apply right-click to a specific item in a list, but in our case it made the
> most sense to take it all the way and actually select the item being
> clicked on. For that we had to resort to the workaround to check the
> clickLine to set the hilitedLines appropriately, but be careful once you
> start down that road, as some actions which set the hilitedLines may not
> set that property properly from a right-click, which would then throw off
> arrowkey traversal of the list requiring you to write your own arrowKey
> handler as well.
>
> It might be ideal if there were a property for list fields for this,
> something like the "rightClickSetsSelection" property.
>
> In the meantime, just be sure to test your arrowKey navigation and be
> prepared to write another handler if needed, and with a little extra work
> you can get exactly what you're looking for.
>
More information about the use-livecode
mailing list