Re: NSTimer Problem
Re: NSTimer Problem
- Subject: Re: NSTimer Problem
- From: Brendan Younger <email@hidden>
- Date: Sun, 12 May 2002 16:01:17 -0400
On Sunday, May 12, 2002, at 01:41 PM, Doug Brown wrote:
I'm having what seems to be a very simple problem with NSTimers. I have
a timer set up to repeatedly fire, but when I hold down the mouse on a
button in the window, or on the "minimize" button at the top of the
window, the timer stops firing. Is there a way to get it to keep firing
even when the user is holding down the mouse on one of these buttons?
By the way, bringing down a menu from the menu bar does not make it
pause. Any ideas?
At a low level the timer is still firing, it's just that the UI thread
is consuming all incoming events and trashing all of the ones which have
nothing to do with the task at hand (such as hitting the close or
minimize buttons). Try placing your timer and your update code in a
different thread. There's no guarantee that your secondary thread will
always get enough processor time to keep pace with the timer, but timer
events have fairly high priority so there's a good chance the Mach
scheduler will give you what you want.
Brendan Younger
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.