• 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: cocoa-dev digest, Vol 2 #1352 - 14 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa-dev digest, Vol 2 #1352 - 14 msgs


  • Subject: Re: cocoa-dev digest, Vol 2 #1352 - 14 msgs
  • From: Anthony Duer <email@hidden>
  • Date: Wed, 9 Oct 2002 20:43:38 -0700

I wait for these mouse events
nextEventMatchingMask:(NSLeftMouseDownMask | NSLeftMouseUpMask |
NSLeftMouseDraggedMask | NSOtherMouseUpMask | NSOtherMouseDownMask),
but the problem seems to be that when I hold down the mouse, without
moving the mouse at all, it does not generate any more events. As soon
as i move the cursor slightly, it then fires the action. Is there a way
of getting a continuous stream of events while the mouse is down? Or is
there a better solution to this problem?

Might want to try:

1) Mouse Down event received -> Start a NSTimer for some method with a Date from now of +2.0 seconds.
2) If you get a Mouse Up event, check if the NSTimer is valid, if so, invalidate it.
3) If there is no Mouse Up event, the NSTimer will fire your method where you can invalidate the timer from there as well.

~Anthony Duer
Orion Project
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: SMySQL Problems
  • Next by Date: Re: Cocoa newbie query
  • Previous by thread: Re: SMySQL Problems
  • Next by thread: Coordinate Systems
  • Index(es):
    • Date
    • Thread