• 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: Getting the final value from an NSSlider drag
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the final value from an NSSlider drag


  • Subject: Re: Getting the final value from an NSSlider drag
  • From: Roland King <email@hidden>
  • Date: Wed, 30 Dec 2015 07:31:34 +0800

>
> If you want to know when the last value is sent during mouse tracking, set the ‘actionOn’ property to mouse-up.
>
> So, something like this:
>
> - (void)viewDidLoad
> {
>    [super viewDidLoad];
>
>    self.slider.action = @selector(valueChangedFinally:);
>    self.slider.target = self;
>    [self.slider sendActionOn:NSLeftMouseUpMask];
> }
>
> - (IBAction)valueChangedFinally:(id)sender
> {
>    NSLog(@“Here is the final slider value upon mouse up:%@", [sender stringValue]);
> }
>
> Presumably the other bindings/etc. code would still work to update your real-time display.
>
> Doug Hill

No they don’t - changing that to to NSLeftMouseUpMask has a similar effect to turning off ‘continuous’, all clients get one event, at the end, so the live updating realtime display doesn’t work.

_______________________________________________

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: Getting the final value from an NSSlider drag
      • From: Doug Hill <email@hidden>
References: 
 >Getting the final value from an NSSlider drag (From: Roland King <email@hidden>)
 >Re: Getting the final value from an NSSlider drag (From: Graham Cox <email@hidden>)
 >Re: Getting the final value from an NSSlider drag (From: Ken Thomases <email@hidden>)
 >Re: Getting the final value from an NSSlider drag (From: Doug Hill <email@hidden>)

  • Prev by Date: Re: Getting the final value from an NSSlider drag
  • Next by Date: Re: Getting the final value from an NSSlider drag
  • Previous by thread: Re: Getting the final value from an NSSlider drag
  • Next by thread: Re: Getting the final value from an NSSlider drag
  • Index(es):
    • Date
    • Thread