• 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: Using NSTimer and CGEventPost causes problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSTimer and CGEventPost causes problems


  • Subject: Re: Using NSTimer and CGEventPost causes problems
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Wed, 05 Aug 2009 22:42:19 -0700


On Aug 5, 2009, at 10:24 PM, Quincey Morris wrote:

The problem is that it's perfectly legal for something (e.g. a NSButton responding to a mouse-down) to use a local, modal event loop -- a "while" loop, not a NSRunLoop -- using nextEventMatchingMask:untilDate:inMode:dequeue: to get the events it's interested in, and during that loop timers won't run.

How about scheduling the timer to fire in NSEventTrackingRunLoopMode using -[NSRunLoop addTimer:forMode:]? I'm not sure how that interacts with the CGEvent stuff, but it might be worth a try.




Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Using NSTimer and CGEventPost causes problems (From: Björn Bollensdorff <email@hidden>)
 >Re: Using NSTimer and CGEventPost causes problems (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Design Question
  • Next by Date: Two right buttons on UINavigationBar?
  • Previous by thread: Re: Using NSTimer and CGEventPost causes problems
  • Next by thread: Design Question
  • Index(es):
    • Date
    • Thread