• 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: Capturing slider movement in NSSlider
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capturing slider movement in NSSlider


  • Subject: Re: Capturing slider movement in NSSlider
  • From: Louis Sinclair <email@hidden>
  • Date: Tue, 09 Dec 2003 16:04:31 -0600
  • Organization: Minnetonka Software, Inc.

Hello,

Thanks for all the responses!

My situation was that I had a timer that I expected to work while the
slider was being dragged. I'm playing audio in one thread, and am
using the timer to update meters and monitor changes in a volume
slider. No timer events happen while the mouse is dragging the
control.

Using the -setContinuous method sort of works if I call my meter
code from the action method for the slider, but if the user stops
dragging while holding down the mouse, the meters stop. I'm
thinking I may have to start another thread instead of using a simple
timer if I want the display updates to continue regardless of what
the user is up to.

--
Louis Sinclair


Public Look wrote:
Many Cocoa controls including NSSlider implement their own event tracking loop. They start a modal loop stealing events in mouseDown: and don't stop stealing events until mouseUp:. Apple's documentation has/had sampel code showing exactly how that is done (regardless of whether it was/is a good idea).

Fortunately for you, you don't need to subclass NSSlider to do what you want. It already has a method, -setContinuous: inherited from NSControl that does exactly what you want. You can also make a slider continuous in IB.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Capturing slider movement in NSSlider
      • From: Cameron Hayne <email@hidden>
    • Re: Capturing slider movement in NSSlider
      • From: Public Look <email@hidden>
References: 
 >Capturing slider movement in NSSlider (From: Louis Sinclair <email@hidden>)
 >Re: Capturing slider movement in NSSlider (From: Public Look <email@hidden>)

  • Prev by Date: RE: Xcode style deployment: debug-symbols?
  • Next by Date: Re: Live update of NSTextField in tool bar
  • Previous by thread: Re: Capturing slider movement in NSSlider
  • Next by thread: Re: Capturing slider movement in NSSlider
  • Index(es):
    • Date
    • Thread