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 (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