Re: NSTimer and NSTableView
Re: NSTimer and NSTableView
- Subject: Re: NSTimer and NSTableView
- From: Oscar Bascara <email@hidden>
- Date: Tue, 17 Jul 2001 09:13:28 -0700
Thanks for the information! This sounds like what I need. I'll have to
see if going from the timer in the default run loop mode to the timer in
NSEventTrackingRunLoopMode and then back to the timer in the default run
loop mode transitions smoothly.
Oscar
On Tuesday, July 17, 2001, at 08:59 AM, Douglas Davidson wrote:
On Monday, July 16, 2001, at 09:31 PM, Oscar Bascara wrote:
I'm running an animation in NSView with the frames triggered by
NSTimer. It works pretty well except the animation freezes when
certain parts of the user interface are handled, for example when the
mouse is held down in NSTableView (if only for an instance). How can
I get the animation to run seamlessly?
The problem probably is that your timer is registered only for the
default run loop mode. If you want your timer to continue to fire
during other run loop modes, you need to add it to the run loop for
those modes. The modes you will probably be interested in are
NSModalPanelRunLoopMode (used when a modal panel is up) and
NSEventTrackingRunLoopMode (used when tracking the mouse); the
particular case you mention is probably running in
NSEventTrackingRunLoopMode.
Douglas Davidson