Receiving user events from within an NSTimer callback
Receiving user events from within an NSTimer callback
- Subject: Receiving user events from within an NSTimer callback
- From: John Mikros <email@hidden>
- Date: Thu, 22 Jan 2009 14:55:16 -0800
Hello all,
I'm working on a Cocoa application which does all of its work within
an NSTimer callback that is called regularly. Events are handled
normally within a Cocoa run loop.
However, there are times when within the callback, the code enters an
inner loop, and will not exit until some user action is performed.
I'm trying to force the run loop to pump events within this inner
loop, but I can't seem to ever get it to work.
I've tried calling the following within the inner loop:
- calling [[NSRunLoop currentRunLoop] runUntilDate:[NSDate
dateWithTimeIntervalSinceNow:0.1]];
- calling [[NSRunLoop mainRunLoop] runUntilDate:[NSDate
dateWithTimeIntervalSinceNow:0.1]];
- calling CFRunLoopRunInMode()
- calling ReceiveNextEvent
None of these let me get any events from within my callback. Is there
any way for me to do what I need?
Thanks for any help!
-john
_______________________________________________
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