• 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: ignoring double clicks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ignoring double clicks


  • Subject: Re: ignoring double clicks
  • From: Troy Stephens <email@hidden>
  • Date: Fri, 15 Jul 2005 13:55:36 -0700

On Jul 15, 2005, at 9:22 AM, Chase wrote:
I have an NSView.

I need the user to be able to click it fast and each click should generate a single mouseDown event.

That is, there should be a 1 to 1 ratio between clicks (no matter how fast) and mouseDown events.

As it stands, when the user clicks it fast enough to qaulify as a double-click, those 2 clicks only generate a single mouseDown event.

How can I set the NSView to ignore double clicks?

Your view instance should be receiving a single -mouseDown: message per click, including for the second [and subsequent] click in a double- [or triple-, ...] click in a group. So ordinarily, you should get the behavior you're requesting by default. Identifying grouped clicks usually requires you to specifically consult [theEvent clickCount].


Your view is a direct subclass of NSView? And you're certain you aren't seeing all the clicks?

--
Troy Stephens
Cocoa Frameworks
Apple Computer, Inc.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >ignoring double clicks (From: Chase <email@hidden>)

  • Prev by Date: change binding's value transformer?
  • Next by Date: Re: screensaver notifications?
  • Previous by thread: ignoring double clicks
  • Next by thread: Not even a portion of a window?
  • Index(es):
    • Date
    • Thread