Re: Sliders and Timers
Re: Sliders and Timers
- Subject: Re: Sliders and Timers
- From: "Adam R. Maxwell" <email@hidden>
- Date: Sun, 23 Sep 2007 18:24:49 -0700
On Sep 23, 2007, at 17:22, Frank D. Engel, Jr. wrote:
I have a cocoa app in which I have set up an NSTimer. That timer is
configured to send a message periodically.
There are some sliders on a window in this application. If I start
moving a slider, the timer is frozen until I release the mouse button.
Any way to get the timer pulse delivered while I move the slider?
The slider is probably running its own event loop in mouseDown:, which
bypasses normal event handling. Try creating the timer and then
scheduling it manually in NSDefaultRunLoopMode and
NSEventTrackingRunLoopMode, or kCFRunLoopCommonModes.
http://www.cocoabuilder.com/archive/message/cocoa/2001/4/18/24587
I considered moving the timer into another thread (NSThread), but
I'm not sure if that is the ideal solution or not?
I'd try the runloop approach first.
--
Adam
_______________________________________________
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