Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7521385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:13:38+00:00 2026-05-30T02:13:38+00:00

Working on a tutorial with a NSSlider. What I want: Moving the slider will

  • 0

Working on a tutorial with a NSSlider.

What I want: Moving the slider will show slider value in NSTextField.

Tutorial explains that following method will show slider value in text field:

- (IBAction)sliderDidMove:(id)sender {
    NSSlider *slider = sender;
    double value = [slider doubleValue];
    [sliderValueLabel setDoubleValue:value];    
}

Method does not work so I tried to find the method declaration on Apples developer website
but couldn’t find it. From my understanding is the method: sliderDidMove a class method
from the class NSSlider so why I’m unable to find any documentation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:13:39+00:00Added an answer on May 30, 2026 at 2:13 am

    When slider value changes, it sends -[NSControl action] to its -[NSControl target]. So in Interface Builder you need to Ctrl-drag from the slider to the object that has sliderDidMove: (that will probably be either App Delegate or File’s Owner). The name is chosen by the tutorial’s author, it can be anything else.

    Alternatively, you can set it up programmatically:

    [slider setTarget:self]; // assume the handler is [self sliderDidMove:]
    [slider setAction:@selector(sliderDidMove:)];
    

    Note also that this particular task is better solved with bindings: bind both slider’s and label’s value to a double property of some object, and Cocoa will keep them synchronized.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working through an iPhone tutorial ( link text and it has me put
I will be doing an MVVM Project soon and I'm working a couple tutorial/examples
I am currently working through the tutorial on Django's website. Upon completing the following
I am working off a tutorial that has this line of code: [[UIApplication sharedApplication]
I'm following this tutorial which is working splendidly for has_many :through relationships. I've got
I'm looking for a working tutorial for Rails 3.1 that shows you step-by-step how
Well, seems that so far the tutorial is working as it suppose to. However,
I'm trying to get the Poll tutorial working at my Dreamhost account (I don't
I am currently working through this tutorial: Getting Started with jQuery For the two
I'm working through the NerdDinner MVC tutorial and came across this and was wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.