• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBrowser and double click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBrowser and double click


  • Subject: Re: NSBrowser and double click
  • From: mark <email@hidden>
  • Date: Tue, 27 Jul 2010 07:32:31 +1200

On 25/07/2010, at 9:00 AM, mark wrote:

A problem which is driving me spastic:
I have an NSBrowser that allowes multiple selection.
When I double click one of the selected items, all other selected items deselect.
I have set the doubleaction and action methods and correct target. These are called AFTER the deselection.
I have tried to override doClick and that doesn't prevent the deselection.
Any ideas?

In general this is the expected behaviour. Most stuff that handles multiple selection doesn't wait to see if a click is going to end up as the first of a double-click, and so processes the first click in a straightforward way. Typically, this is to deselect everything except what was clicked (unless modifier keys are down that might extend or flip the selection). On the second click, the double-click is detected and the double action triggered.

How does the Finder do it?


It is possible to be smarter when processing clicks and wait to see if a second click arrives within the double-click time before processing the first click, but you rarely see code that does this, since for one thing it seems unresponsive - every single-click will have no effect until the double-click period elapses.


--Graham

_______________________________________________

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


  • Follow-Ups:
    • Re: NSBrowser and double click
      • From: Corbin Dunn <email@hidden>
References: 
 >NSBrowser and double click (From: mark <email@hidden>)
 >Re: NSBrowser and double click (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Cannot Validate Property - ioValue
  • Next by Date: Re: NSBrowser and double click
  • Previous by thread: Re: NSBrowser and double click
  • Next by thread: Re: NSBrowser and double click
  • Index(es):
    • Date
    • Thread