• 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: Graham Cox <email@hidden>
  • Date: Sun, 25 Jul 2010 15:14:47 +1000

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.

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: mark <email@hidden>
References: 
 >NSBrowser and double click (From: mark <email@hidden>)

  • Prev by Date: Re: Discard all drawing in a UIView
  • Next by Date: Re: If you were me, how do you build mind map app on cocoa?
  • Previous by thread: NSBrowser and double click
  • Next by thread: Re: NSBrowser and double click
  • Index(es):
    • Date
    • Thread