Re: NSTimer and NSTableView
Re: NSTimer and NSTableView
- Subject: Re: NSTimer and NSTableView
- From: Douglas Davidson <email@hidden>
- Date: Tue, 17 Jul 2001 08:59:53 -0700
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