• 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: Custom NSSlider?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom NSSlider?


  • Subject: Re: Custom NSSlider?
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Mon, 01 Dec 2008 22:09:39 -0500

huh, nevermind, it was actually a stupid mistake on my end...

I connected the slider to the sliderEnded action instead of sliderMoved (it's weird Im sure I double-checked...) anyway .... It's working now! thanks a lot

J-N

On 1-Dec-08, at 10:06 PM, Jean-Nicolas Jolivet wrote:

Yup, still getting them, I also tried to move the 3 lines at the beginning of the sliderMoved method, still no luck...apparently it's not the binding thats keeping it from working I guess?

J-N

On 1-Dec-08, at 10:00 PM, James Walker wrote:

Jean-Nicolas Jolivet wrote:
Thanks for the info, I found the piece of code you were referring to, but somehow I can't get it to work... here's my code:
- (IBAction)sliderMoved:(id)sender {
SEL trackingEndedSelector = @selector(sliderEnded:);
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:trackingEndedSelector object:sender];
[self performSelector:trackingEndedSelector withObject:sender
afterDelay:0.0];
// do whatever you want to do during tracking here
[self willChangeValueForKey:@"imageContrast"];
imageContrast = [sender doubleValue];
[self didChangeValueForKey:@"imageContrast"];
}
- (void)sliderEnded:(id)sender {
// do whatever you want to do when tracking ends here
NSLog(@"Done tracking");
}
My label is bound to imageContrast so that it is updated live.... right now I'm only trying to log a message when the tracking is done... my slider is connected to the sliderMoved action... did I do anything wrong? Right now when I move the slider I get a ton of "Done tracking" messages in the console, and my label is never updated.. which is... well, almost the opposite of what should happen....

This trick works for me, but I have not combined it with bindings. What happens if you comment out the 3 lines that are updating imageContrast, do you still get "Done tracking" messages during tracking?
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>

Jean-Nicolas Jolivet email@hidden http://www.silverscripting.com

_______________________________________________

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

Jean-Nicolas Jolivet email@hidden http://www.silverscripting.com

_______________________________________________

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


References: 
 >Custom NSSlider? (From: Jean-Nicolas Jolivet <email@hidden>)
 >Re: Custom NSSlider? (From: James Walker <email@hidden>)
 >Re: Custom NSSlider? (From: Jean-Nicolas Jolivet <email@hidden>)
 >Re: Custom NSSlider? (From: James Walker <email@hidden>)
 >Re: Custom NSSlider? (From: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: Custom NSSlider?
  • Next by Date: Re: best way to add transitions
  • Previous by thread: Re: Custom NSSlider?
  • Next by thread: Shouldn't NSOpenPanel media browser aliases be resolved before type check?
  • Index(es):
    • Date
    • Thread