• 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: Creating a runloop to handle specific mouse events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a runloop to handle specific mouse events


  • Subject: Re: Creating a runloop to handle specific mouse events
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 4 Sep 2008 21:25:51 +0200

On 04.09.2008, at 17:04, Benjamin Stiglitz wrote:
This isn’t really polling as much as taking over the runloop and filtering out some events. There’s nothing really inelegant about this—it’s the call that powers the tracking loop in most of the controls in AppKit. If you really wanted, you could shuffle off the events to another thread for processing later.


Also, if you use the run loop correctly, it will block until your timeout is hit. Which is much more well-behaved than busy-polling.

OTOH, I hope you're not getting GUI events on that run loop like mouse clicks, because I don't think that's supported from multiple threads, so you may get odd crashes doing that.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

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


References: 
 >nibless applications (From: David Alter <email@hidden>)
 >Re: nibless applications (From: Filip van der Meeren <email@hidden>)
 >Re: nibless applications (From: Jeff Johnson <email@hidden>)
 >Creating a runloop to handle specific mouse events (From: Berk Özer <email@hidden>)
 >Re: Creating a runloop to handle specific mouse events (From: Benjamin Stiglitz <email@hidden>)

  • Prev by Date: Re: Notify when file moved
  • Next by Date: Re: line break in Interface Builder
  • Previous by thread: Re: Creating a runloop to handle specific mouse events
  • Next by thread: Re: nibless applications
  • Index(es):
    • Date
    • Thread