• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sliders and Timers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Sliders and Timers
      • From: "Frank D. Engel, Jr." <email@hidden>
References: 
 >Sliders and Timers (From: "Frank D. Engel, Jr." <email@hidden>)

  • Prev by Date: Re: Sliders and Timers
  • Next by Date: checking status of a background app in a Cocoa program
  • Previous by thread: Re: Sliders and Timers
  • Next by thread: Re: Sliders and Timers
  • Index(es):
    • Date
    • Thread