Re: Using NSTimer and CGEventPost causes problems
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