• 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: [RESOLVED] process events in tight loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RESOLVED] process events in tight loop?


  • Subject: Re: [RESOLVED] process events in tight loop?
  • From: Dave Camp <email@hidden>
  • Date: Thu, 14 Jul 2005 11:26:39 -0700


On Jul 14, 2005, at 12:28 AM, Chase wrote:

When using a threaded based solution, you should really put some effort into insuring that the worker thread(s) do not spin. Ever.


You're preaching to the choir, Bill. I am probably to most event- driven/anti-polling person there ever was, and I truly tried every other means I could think of to stay aware of mouse position in a background-only app, but this appears to be the only way to get the job done.


If anyone knows how to receive mouseMoved events in a background- only app, I'd love to hear about it. But I don't think such is possible since, in most cases, it defies the very nature of a background-only app to receive mouse moved events. I do, however, need, in this particular and rare instance, to keep track of the whereabouts of the mouse **only** while that little window is open for a few seconds.

Until then, this solution meets my needs and at a minimum of cpu overhead (given the fact that I'm polling of course).

You might be able to use the HID manager or possibly some Quartz/CG APIs to get this kind of functionality.


Dave


--- There's an old proverb that says just about whatever you want it to.

_______________________________________________
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: 
 >process events in tight loop? (From: Chase <email@hidden>)
 >Re: process events in tight loop? (From: Dave Camp <email@hidden>)
 >Re: [RESOLVED] process events in tight loop? (From: Chase <email@hidden>)
 >Re: [RESOLVED] process events in tight loop? (From: Bill Bumgarner <email@hidden>)
 >Re: [RESOLVED] process events in tight loop? (From: Chase <email@hidden>)

  • Prev by Date: Re: Adding resources to the Application
  • Next by Date: Re: NSBrowser focus question
  • Previous by thread: Re: [RESOLVED] process events in tight loop?
  • Next by thread: Core Data: transient attributes require bogus type to quiet compiler?
  • Index(es):
    • Date
    • Thread