• 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
Need help moving an NSSlider
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help moving an NSSlider


  • Subject: Need help moving an NSSlider
  • From: Iain Wood <email@hidden>
  • Date: Mon, 9 Feb 2004 00:23:31 +0000

Hi,

I think I'm missing something obvious, but I cant get this to work. Perhaps someone can spot what I'm doing wrong..

I'm trying to set the value of a slider from an incoming midi signal, and generate midi by moving the same slider. The midi bit I can do, but getting the slider to reflect the incoming midi signal has got me stumped. Stripping everything else away I'm left with this code:

#import <Cocoa/Cocoa.h>
@interface Controller : NSObject
{
IBOutlet id slider;
IBOutlet id window;
}
- (IBAction)setSlider:(id)sender;
@end


@implementation Controller
- (IBAction)setSlider:(id)sender
{
[window insertText:[NSString localizedStringWithFormat:@"\nSender Value:%d",[sender intValue]]];
[slider setIntValue:[sender intValue]];
}
@end

I have slider connected to an NSSlider, and window connected to an NSTextField. A second slider is connected to the setSlider method, and when I move that slider, a series of values gets sent to the window NSTextField, but the NSSlider connected to slider doesn't move.

Tia

Iain
_______________________________________________
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: Need help moving an NSSlider
      • From: John Pannell <email@hidden>
    • Re: Need help moving an NSSlider
      • From: Ryan Bates <email@hidden>
  • Prev by Date: NSTextStorage subclass not updating NSTextView
  • Next by Date: Re: strange semi-newbie issue SOLVED with questions
  • Previous by thread: Re: NSTextStorage subclass not updating NSTextView [SOLVED]
  • Next by thread: Re: Need help moving an NSSlider
  • Index(es):
    • Date
    • Thread