Re: Getting the final value from an NSSlider drag

2015-12-30 Thread Doug Hill
> On Dec 29, 2015, at 3:31 PM, Roland King wrote: > >> >> 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 =

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Graham Cox
> On 30 Dec 2015, at 9:45 AM, Ken Thomases wrote: > > This gives false positives if the user simply stops moving the mouse but > doesn't release the mouse button. There's no delay you can specify that > avoids this, since there's no upper bound to how long the user can hold the > mouse butto

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
>> >> Never drove a slider with the keyboard before, so I added a keyDown and >> keyUp method to the mouseDown: one I posted earlier, with a bit of code to >> try and be smart about when to send updates, so you don’t get them if you’re >> just tabbing though. Seems to work well enough for this

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Lee Ann Rucker
> On Dec 29, 2015, at 3:51 PM, Roland King wrote: > > >> On 30 Dec 2015, at 05:53, Lee Ann Rucker wrote: >> >> >>> >> >> >> Actually it's easy. For very similar reasons I needed the same behavior - >> live update of the slider's temp value for UI elements, but only call the >> final set

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Uli Kusterer
> On 29 Dec 2015, at 23:45, Ken Thomases wrote: > > On Dec 29, 2015, at 5:44 AM, Graham Cox wrote: >> >> On 29 Dec 2015, at 7:44 PM, Roland King wrote: >>> >>> I can subclass NSSlider or possibly NSSliderCell but that sounds like a >>>

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 30 Dec 2015, at 05:53, Lee Ann Rucker wrote: > > >> > > > Actually it's easy. For very similar reasons I needed the same behavior - > live update of the slider's temp value for UI elements, but only call the > final setter when the user is done. I subclassed NSSlider's keyUp: and > k

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> > 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;

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Doug Hill
> On Dec 29, 2015, at 2:45 PM, Ken Thomases wrote: > > On Dec 29, 2015, at 5:44 AM, Graham Cox <mailto:graham@bigpond.com>> wrote: >> >> On 29 Dec 2015, at 7:44 PM, Roland King wrote: >>> >>> I can subclass NSSlider or possibly NSSlide

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Ken Thomases
On Dec 29, 2015, at 5:44 AM, Graham Cox wrote: > > On 29 Dec 2015, at 7:44 PM, Roland King wrote: >> >> I can subclass NSSlider or possibly NSSliderCell but that sounds like a >> whole world of pain, if I have to do that I’ll probably just put a >> coalescing de

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Lee Ann Rucker
NSEvent.pressedMouseButtons() and that does appear to work and let me find > the final value. I didn’t get great comfort from the documentation that this > is reliable however. > > I can subclass NSSlider or possibly NSSliderCell but that sounds like a whole > world of pain, Ac

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Graham Cox
> On 29 Dec 2015, at 7:44 PM, Roland King wrote: > > I can subclass NSSlider or possibly NSSliderCell but that sounds like a whole > world of pain, if I have to do that I’ll probably just put a coalescing delay > into the whole thing which waits 1/2 second after an u

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 29 Dec 2015, at 17:54, Quincey Morris > wrote: > > On Dec 29, 2015, at 01:45 , Roland King > wrote: >> >> the slider is hooked up via bindings in the UI to a label which shows the >> value *as you slide it*, so it needs to be continuous for that purpose. Then >> w

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Quincey Morris
On Dec 29, 2015, at 01:45 , Roland King wrote: > > the slider is hooked up via bindings in the UI to a label which shows the > value *as you slide it*, so it needs to be continuous for that purpose. Then > when you let go, only then do I want the final value to be delivered to the > app Yeah,

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
over .. so it just took this. import Cocoa public protocol RKEndValueSliderTarget : NSObjectProtocol { func sliderValueChangeEnded( slider : NSSlider ) } public class RKEndValueSlider: NSSlider { public var endValueReceiver : RKEndValueSliderTarget? publi

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Quincey Morris
On Dec 29, 2015, at 00:44 , Roland King wrote: > > I want to capture, in the app, the value of the slider only at the end when > the mouse goes up, once Isn’t that what the NSControl property continuous==false is for? ___ Cocoa-dev mailing list (Coc

Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
however. I can subclass NSSlider or possibly NSSliderCell but that sounds like a whole world of pain, if I have to do that I’ll probably just put a coalescing delay into the whole thing which waits 1/2 second after an update before it actually does the update. Any good ways to do this

Re: Arrow Keys in NSSlider

2015-09-08 Thread Raglan T. Tiger
Coolio, I will get on these suggestion, thx! -rags > On Sep 8, 2015, at 2:47 PM, Quincey Morris > wrote: > > On Sep 8, 2015, at 13:28 , Raglan T. Tiger wrote: >> >> What more do I need do ? > > It’s hard to say, but at the very least you’ll actually need t

Re: Arrow Keys in NSSlider

2015-09-08 Thread Lee Ann Rucker
NSSlider does normally respond to keystrokes if you’ve turned on Full Keyboard Access in System Prefs > Keyboard > Shortcuts. If it works with that but not with your changes, it’s doing something complicated you’ll have to adjust for. I’ve only subclassed it to enhance the snapping behav

Re: Arrow Keys in NSSlider

2015-09-08 Thread Quincey Morris
On Sep 8, 2015, at 13:28 , Raglan T. Tiger wrote: > > What more do I need do ? It’s hard to say, but at the very least you’ll actually need to *make* the NSSlider first responder, which means you’ll have to click it first or tab to it. You also don’t say what you think should happen if

Re: Arrow Keys in NSSlider

2015-09-08 Thread Mike Abdullah
> On 8 Sep 2015, at 21:28, Raglan T. Tiger wrote: > > In a window are multiple views. One view contains an NSSlider. I would like > to move the slider with arrow keys. > > I have subclassed NSSlider, added a -keyDown: method,and > -acceptsFirstResponder that returns

Arrow Keys in NSSlider

2015-09-08 Thread Raglan T. Tiger
In a window are multiple views. One view contains an NSSlider. I would like to move the slider with arrow keys. I have subclassed NSSlider, added a -keyDown: method,and -acceptsFirstResponder that returns YES. -keyDown is not being called. What more do I need do ? -rags

Re: NSSlider atop an image on OS 10.10 [SOLVED]

2015-02-22 Thread Tim Hewett
Solved by changing the base view to a generic NSView and adding the NSImageView and NSSlider to that view (the slider over the image view), rather than previously the NSImageView being the base view with the slider control added to it (worked fine up to 10.10). On 22 Feb 2015, at 03:06, Tim

NSSlider atop an image on OS 10.10

2015-02-21 Thread Tim Hewett
I have a NSMenuItem with a view containing an image and a NSSlider over the top of the image. The slider cell is subclassed to draw a different slider knob. Up to OS 10.9 the image shows through the slider view rect so that all that is above the image is the slider bar and the knob. However

10.10 NSSlider continuous mode sends gazillions of action messages

2014-07-26 Thread Markus Spoettl
Hi, for some reason NSSlider set up to send continuous action messages sends a much higher number action messages (10 times as many) than it previously did. This affects not only apps linked against 10.10 but also ones that link against 10.9. Is this intentional? The AppKit release notes

Re: NSSlider value difference in two places...

2014-06-01 Thread Graham Cox
ctly" is often more work than seems worthwhile. --Graham On 2 Jun 2014, at 11:19 am, Peters, Brandon wrote: > Graham, > > For the first action: > > Declaration: > > // allows user to set the value of the friction coefficient > IBOutlet NSSlider *_frictio

Re: NSSlider value difference in two places...

2014-06-01 Thread Peters, Brandon
Graham, For the first action: Declaration: // allows user to set the value of the friction coefficient IBOutlet NSSlider *_frictionSlider; // displays friction coefficient chosen by the user IBOutlet NSTextField *_frictionDisplay; // allows user to set the mass

Re: NSSlider value difference in two places...

2014-06-01 Thread Graham Cox
On 2 Jun 2014, at 10:28 am, Peters, Brandon wrote: > have a slider used to adjust a value. When the slider is moved, an action is > triggered to display the value in a panel. When a start button is pressed, > another action is triggered, and within that action the value of the slider > is as

NSSlider value difference in two places...

2014-06-01 Thread Peters, Brandon
Issue: I have a slider used to adjust a value. When the slider is moved, an action is triggered to display the value in a panel. When a start button is pressed, another action is triggered, and within that action the value of the slider is ascertained. I have discovered than when calling the se

Re: NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?

2013-05-29 Thread Paul Johnson
Quincy Morisses reply completely resolved the issue I was having with bindings. I realized that we exchanged emails without copying this board. I think Quincy's reply might be helpful to others, so I'm reposting his reply on this board: On May 28, 2013, at 16:25 , Paul Johnson wrote: Thanks, Qui

Re: NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?

2013-05-28 Thread Quincey Morris
On May 28, 2013, at 13:16 , Paul Johnson wrote: > I have a slider, a stepper, and a textField that are synchronized using > bindings. I didn't write any code to do this, just used Xcode with its > Interface Builder. When the program starts I don't see the slider set to > the "Current" position I'

NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?

2013-05-28 Thread Paul Johnson
I have a slider, a stepper, and a textField that are synchronized using bindings. I didn't write any code to do this, just used Xcode with its Interface Builder. When the program starts I don't see the slider set to the "Current" position I'd like and the textField doesn't show the "Current" value

QuickTime player X - like timeline control (NSSlider for setting video position)

2012-11-02 Thread Nick
Hello, I am trying to write a customized video player, and I would like to have a slider showing and controlling the QTMovie progress. I am using QTKit (since I need Snow Leopard support, which is still widely used). I have placed an NSSlider onto the view, and set it to "Continuous",

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Conrad Shultz
On 3/1/12 4:13 PM, Graham Cox wrote: > > On 02/03/2012, at 11:00 AM, Sean McBride wrote: > >> Any suggested subclassing points? That's where I'm stuck really... > > > > Wait. If you only set one tick mark, it is centred anyway does that not > do the job for you? Setting a tick mark has

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Quincey Morris
On Mar 1, 2012, at 13:18 , Sean McBride wrote: > I have a continuous linear NSSlider who's range is -180 to 180 degrees. I > don't want tick marks because any value is acceptable. However, the value > zero is important, and I need for the user to be able to get to exa

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Graham Cox
On 02/03/2012, at 11:00 AM, Sean McBride wrote: > Any suggested subclassing points? That's where I'm stuck really... Wait. If you only set one tick mark, it is centred anyway does that not do the job for you? --Graham ___ Cocoa-dev mailing

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Graham Cox
On 02/03/2012, at 11:00 AM, Sean McBride wrote: > Any suggested subclassing points? That's where I'm stuck really... Look at NSSliderCell. What I'd suggest is setting a single tick mark, and have your subclass treat it as a centred tick mark. Your subclass might not even draw it, but the sli

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Sean McBride
On Fri, 2 Mar 2012 10:31:29 +1100, Graham Cox said: >I guess what might be nice is a tendency for it to "snap" to the zero >position when the slider is dragged close to it. Yes, that's what I'm looking for. > You might be able to do >that with a standard slider by manipulating the values close t

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Graham Cox
On 02/03/2012, at 8:18 AM, Sean McBride wrote: > Hi all, > > I have a continuous linear NSSlider who's range is -180 to 180 degrees. I > don't want tick marks because any value is acceptable. However, the value > zero is important, and I need for the user to be a

Re: Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Marco Tabini
On 2012-03-01, at 4:18 PM, Sean McBride wrote: > Hi all, > > I have a continuous linear NSSlider who's range is -180 to 180 degrees. I > don't want tick marks because any value is acceptable. However, the value > zero is important, and I need for the user to be a

Suggestions for forcing NSSlider to some values, without tickmarks

2012-03-01 Thread Sean McBride
Hi all, I have a continuous linear NSSlider who's range is -180 to 180 degrees. I don't want tick marks because any value is acceptable. However, the value zero is important, and I need for the user to be able to get to exactly 0.0 (0.1 or whatever is no good). How would y

Re: NSSlider and arrangedObjects

2012-01-22 Thread Ken Thomases
On Jan 21, 2012, at 6:37 PM, Quincey Morris wrote: > On Jan 21, 2012, at 00:54 , Ken Thomases wrote: > >> Table columns do have special handling for array-valued bindings. It's that >> they distribute the array values among their rows. Table columns are not >> special in being able to bind t

Re: NSSlider and arrangedObjects

2012-01-21 Thread Quincey Morris
On Jan 21, 2012, at 00:54 , Ken Thomases wrote: > Table columns do have special handling for array-valued bindings. It's that > they distribute the array values among their rows. Table columns are not > special in being able to bind through collection properties. That's a > feature of NSArra

Re: NSSlider and arrangedObjects

2012-01-21 Thread Tobias Wood
Thanks for the responses guys, I think I follow most of it. My documents for this app are essentially movies (4D images, the 4th dimension is time). I want this particular slider to set the timepoint for all open documents, in a 'write only' fashion. Currently there is no UI to set the timepoin

Re: NSSlider and arrangedObjects

2012-01-21 Thread Ken Thomases
On Jan 21, 2012, at 1:00 AM, Quincey Morris wrote: > On Jan 19, 2012, at 03:03 , Tobias Wood wrote: > >> Binding the NSSlider's value to the NSArrayController's >> "arrangedObjects.propertyName" causes my program to get a SIGABRT on >> opening, with the following uncaught exception: >> "Cannot

Re: NSSlider and arrangedObjects

2012-01-21 Thread Quincey Morris
On Jan 19, 2012, at 03:03 , Tobias Wood wrote: > I am attempting to bind an NSSlider to a property of every object in an > NSArrayController, rather than just the current selection. There are other > properties that are bound to the selection, but this particular one I want to >

NSSlider and arrangedObjects

2012-01-20 Thread Tobias Wood
Hi everyone, I am attempting to bind an NSSlider to a property of every object in an NSArrayController, rather than just the current selection. There are other properties that are bound to the selection, but this particular one I want to change for everything, regardless. The array managed by

Re: Custom NSSlider

2011-06-17 Thread Nick
Thanks guys Depends on what you mean by "everyone" ... ? > > QTMovieView and NSMovieView and the likes have built-in controllers that > you can just use out of the box. Many places use that, however they look > kinda 10.4-ish. If you want some of the more modern looks (either like > Spotlight ha

Re: Custom NSSlider

2011-06-16 Thread Uli Kusterer
On 16.06.2011, at 03:18, Nick wrote: > I am wondering if there are any free custom NSSlider controles available > with changed knob and trackbar images? > The ones similar to QuickTime Player and iTunes (for a player application). > Does everyone implement them from scratch by subclass

Re: Custom NSSlider

2011-06-16 Thread Stephen Blinkhorn
On 15 Jun 2011, at 19:18, Nick wrote: Hello I am wondering if there are any free custom NSSlider controles available with changed knob and trackbar images? The ones similar to QuickTime Player and iTunes (for a player application). Does everyone implement them from scratch by subclassing

Re: Custom NSSlider

2011-06-16 Thread Vyacheslav Karamov
Look towards BWToolkit. But note: you should better use XCode 3.2.6, not 4.0.2, cause XCode 4.x lack of plug-ins support. 16-Jun-11 11:20, Nick пишет: Basically I was looking for some freely available fancy controls, that are suitable for players. Like AlphaControls for Delphi (for Windows) o

Re: Custom NSSlider

2011-06-16 Thread Nick
Basically I was looking for some freely available fancy controls, that are suitable for players. Like AlphaControls for Delphi (for Windows) or something. Specifically for custom sliders. (I am writing a custom player that can play files over network, and, on the movie view, when the user moves t

Re: Custom NSSlider

2011-06-16 Thread Vyacheslav Karamov
I'm currently support project which use custom NSSlider. 16-Jun-11 04:18, Nick пишет: Hello I am wondering if there are any free custom NSSlider controles available with changed knob and trackbar images? The ones similar to QuickTime Player and iTunes (for a player application). Does eve

Custom NSSlider

2011-06-15 Thread Nick
Hello I am wondering if there are any free custom NSSlider controles available with changed knob and trackbar images? The ones similar to QuickTime Player and iTunes (for a player application). Does everyone implement them from scratch by subclassing the cell class? Thank you

Re: NSSlider Mouse Up

2010-12-16 Thread Kyle Sluder
010/12/16 Fritz Anderson : > I'm at the airport and without access to the documentation, but I doubt that > Cocoa promises that NSSlider will always be implemented in terms of a Carbon > button. I think you've stumbled on an undocumented technique that > accide

Re: NSSlider Mouse Up

2010-12-16 Thread Fritz Anderson
I'm at the airport and without access to the documentation, but I doubt that Cocoa promises that NSSlider will always be implemented in terms of a Carbon button. I think you've stumbled on an undocumented technique that accidentally happens to work. Take the advice about the perfo

Re: NSSlider Mouse Up

2010-12-16 Thread koko
: Hi Koko, On Thu, Dec 16, 2010 at 2:37 PM, wrote: What is the preferred way of receiving an action when the mouse is released in an NSSlider? The preferred thing is not to do precisely that. It's to have the action method use, say, -performSelector:withObject:afterDelay

Re: NSSlider Mouse Up

2010-12-16 Thread Ken Ferry
Hi Koko, On Thu, Dec 16, 2010 at 2:37 PM, wrote: > What is the preferred way of receiving an action when the mouse is released > in an NSSlider? > The preferred thing is not to do precisely that. It's to have the action method use, say, -performSelector:withObject:a

NSSlider Mouse Up

2010-12-16 Thread koko
What is the preferred way of receiving an action when the mouse is released in an NSSlider? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: NSSlider

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 19:30, mmalc Crawford a écrit : > > On Jan 28, 2010, at 9:42 am, vincent habchi wrote: > >>> Check the "continuous" checkbox in IB (or set the object property of the >>> same name) and your target will get called while the user drags, as soon as >>> the position changes. >>

Re: NSSlider

2010-01-28 Thread Kyle Sluder
[0,1] instead of integers. Isn't that the perfect case for a value transformer? Why would you instead subclass NSSlider when a much simpler infrastructure already exists? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: NSSlider

2010-01-28 Thread mmalc Crawford
On Jan 28, 2010, at 9:42 am, vincent habchi wrote: >> Check the "continuous" checkbox in IB (or set the object property of the >> same name) and your target will get called while the user drags, as soon as >> the position changes. > > Do not forget there are some pitfalls. For example, I bound

Re: NSSlider

2010-01-28 Thread David Blanton
Continuous Check Box did the trick .. Thanks! -db On Jan 28, 2010, at 10:11 AM, Jens Alfke wrote: On Jan 28, 2010, at 9:05 AM, David Blanton wrote: I cannot discern a method that tracks the knob on and NSSlider. Check the "continuous" checkbox in IB (or set the object propert

Re: NSSlider

2010-01-28 Thread vincent habchi
> On Jan 28, 2010, at 9:05 AM, David Blanton wrote: > >> I cannot discern a method that tracks the knob on and NSSlider. > > Check the "continuous" checkbox in IB (or set the object property of the same > name) and your target will get called while the user dr

Re: NSSlider

2010-01-28 Thread vincent habchi
Le 28 janv. 2010 à 18:05, David Blanton a écrit : > I cannot discern a method that tracks the knob on and NSSlider. > > Is it possible to track an NSSlider? Binds "value" to some KVC variable of your tracking object, no? Vincent___

Re: NSSlider

2010-01-28 Thread Jens Alfke
On Jan 28, 2010, at 9:05 AM, David Blanton wrote: > I cannot discern a method that tracks the knob on and NSSlider. Check the "continuous" checkbox in IB (or set the object property of the same name) and your target will get called while the user drags, as soon as the pos

NSSlider

2010-01-28 Thread David Blanton
I cannot discern a method that tracks the knob on and NSSlider. Is it possible to track an NSSlider? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

NSSlider circularSlider drawKnob & custom knobs

2009-12-25 Thread Christian Haines
I have been looking for a simple way to create a knob controller with a custom image. I have attempted subclassing NSSlider, using setSliderType NSCircularSlider and drawing a new knob using the drawKnob method. Apparently it appears drawKnob is not called under Leopard when the

NSSlider with multiple values?

2009-07-22 Thread ALEXander
Hello all, I have an NSSlider which can relate to multiple different values. What would be a good way of showing the user that if the touches the slider he will change all these values to the value on the slider? Like the dash in an NSCheckBox, but just for NSSlider. Best, ALEXander

Re: circular NSSlider not endless

2009-04-08 Thread Benjamin Dobson
On 8 Apr 2009, at 13:48:43, Tilo Villwock wrote: Does anyone know, whether there is a way to make a circular NSSlider not endless, so that it stops at a certain value? Thanks Tilo That depends what you mean. If you mean it should act like a physical volume control, where the slider

Re: NSSlider with mouseUp

2009-03-27 Thread Quincey Morris
On Mar 27, 2009, at 21:39, K. Darcy Otto wrote: I have a preferences window with an NSSlider control in it that has to update continuously in order to indicate just where the marker is on the scale. But, because of the relatively complex changes required when the slider is set, I only

NSSlider with mouseUp

2009-03-27 Thread K. Darcy Otto
I have a preferences window with an NSSlider control in it that has to update continuously in order to indicate just where the marker is on the scale. But, because of the relatively complex changes required when the slider is set, I only want to act on the slider settings when the slider

Re: NSSlider changed notification

2009-03-11 Thread Steve Christensen
As previous replies have mentioned, if you're looking for continuous change, you need to make sure that "continuous" is set to YES, either by checking "continuously send action while sliding" in IB or by calling [mySlider setContinuous:YES]. You could keep track of changes to the slider val

Re: NSSlider changed notification

2009-03-10 Thread Randall Meadows
On Mar 10, 2009, at 12:03 PM, David Alter wrote: Hi All, I'm sure this is something basic that I'm just missing. For some reason I can not find how to get a notification when my slider changes value. I want to be able to subscribe to receive a notification if the slider value changes. Is th

Re: NSSlider changed notification

2009-03-10 Thread Kyle Sluder
NSSlider fires its action when the value changes. If its continuous property is YES, this happens while the user drags the widget. Otherwise it only sends its action when the mouse is released. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev

NSSlider changed notification

2009-03-10 Thread David Alter
Hi All, I'm sure this is something basic that I'm just missing. For some reason I can not find how to get a notification when my slider changes value. I want to be able to subscribe to receive a notification if the slider value changes. Is there a delegate method for this? What is the best way to g

Re: mouseUp event for NSSlider

2009-03-05 Thread John C. Randolph
On Mar 5, 2009, at 1:43 PM, Norio wrote: Hi, Would you give me any suggestions to get the mouseUp event for NSSlider? I've tried to make subclass of NSSlider and override mouseUp: and then put a breakpoint, but the debugger didn't stop at the breakpoint. What's trippi

Re: mouseUp event for NSSlider

2009-03-05 Thread Michael Ash
On Thu, Mar 5, 2009 at 4:43 PM, Norio wrote: > Hi, > > Would you give me any suggestions to get the mouseUp event for NSSlider? > > I've tried to make subclass of NSSlider and override mouseUp: and then put a > breakpoint, > but the debugger didn't stop at the bre

Re: mouseUp event for NSSlider

2009-03-05 Thread Ron Fleckner
On 06/03/2009, at 8:43 AM, Norio wrote: Hi, Would you give me any suggestions to get the mouseUp event for NSSlider? I've tried to make subclass of NSSlider and override mouseUp: and then put a breakpoint, but the debugger didn't stop at the breakpoint. Best regards, Norio

mouseUp event for NSSlider

2009-03-05 Thread Norio
Hi, Would you give me any suggestions to get the mouseUp event for NSSlider? I've tried to make subclass of NSSlider and override mouseUp: and then put a breakpoint, but the debugger didn't stop at the breakpoint. Best regards, Norio

Re: NSSlider: How to set a parameter value?

2008-12-29 Thread Graham Cox
On 30 Dec 2008, at 12:55 am, Marcelo Cicconet wrote: But how can I move the playback position to another point of the sound via a slider? In your controller object, implement an action method like: - (IBAction)soundTimeAction:(id) sender { [mySound setCurrentTime:[sender floatVa

Re: NSSlider: How to set a parameter value?

2008-12-29 Thread Marcelo Cicconet
I'd like to control the playback position of a sound managed by the NSSound class. I just know how to update the playback position based on the sound current time: [playbackSlider setFloatValue:[sound currentTime]/[sound duration]]; But how can I move the playback position to another point of the

Re: NSSlider: How to set a parameter value?

2008-12-29 Thread Graham Cox
On 29 Dec 2008, at 9:31 pm, Marcelo Cicconet wrote: Hi.How do I use a slider to set a parameter value? What have you tried? What do *you* mean by 'parameter value'? Hooking up a slider to another object - usually a controller - you can use target/action and bindings, to name the most com

NSSlider: How to set a parameter value?

2008-12-29 Thread Marcelo Cicconet
Hi.How do I use a slider to set a parameter value? Thanks. Marcelo C. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.c

Re: KVO on NSSlider not observing

2008-12-12 Thread Quincey Morris
On Dec 12, 2008, at 04:36, Aaron Wallis wrote: I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the following code: - (

Re: KVO on NSSlider not observing

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 8:20 AM, Aaron Wallis wrote: > Usually I'd just use bindings in IB, but this is the first time i've had to > build the interface through code. When you set up bindings in IB, you bind the view to the controller. So, you should do the same from code. Send -bind:toObject:wi

Re: KVO on NSSlider not observing

2008-12-12 Thread Aaron Wallis
Thanks for the help Graham and Keith. Usually I'd just use bindings in IB, but this is the first time i've had to build the interface through code. There's always something to learn it seems :D - Az On 13/12/2008, at 12:12 AM, Graham Cox wrote: On 12 Dec 2008, at 11:36 pm, Aaron Wallis wr

Re: KVO on NSSlider not observing

2008-12-12 Thread Graham Cox
On 12 Dec 2008, at 11:36 pm, Aaron Wallis wrote: Hi there, I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the follow

Re: KVO on NSSlider not observing

2008-12-12 Thread Keith Duncan
Aaron, You wouldn't typically observe a view class. In this case what your problem is that NSSlider doesn't change it's internal value in a key value observing compliant manner. You should observe the underlying value that the slider represents in your controller.

KVO on NSSlider not observing

2008-12-12 Thread Aaron Wallis
Hi there, I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the following code: - (void)setupSliders { [controlsView.

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-12-07 Thread Michael A. Crawford
Well, I don't know if you guys are still listening on this thread but, for the record, I did put Graham's suggestion into practice, immediately. It was fast, easy, and simple to modify when I wanted to tweak the behavior to use float values instead of integers. Thanks, Graham. After g

Re: Custom NSSlider?

2008-12-01 Thread Jean-Nicolas Jolivet
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 ge

Re: Custom NSSlider?

2008-12-01 Thread Jean-Nicolas Jolivet
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

Re: Custom NSSlider?

2008-12-01 Thread James Walker
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 cancelPreviousPerformRequestsWithTa

Re: Custom NSSlider?

2008-12-01 Thread Jean-Nicolas Jolivet
et 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 J-N On 1-Dec-08, at 7:50 PM, James Walker wrote: Jean-Nicolas Jolivet wrote: I was wondering if its possible to have an NSSlider s

Re: Custom NSSlider?

2008-12-01 Thread James Walker
Jean-Nicolas Jolivet wrote: I was wondering if its possible to have an NSSlider send an action after the user finished dragging, while still providing continuous updates? Look in the archives for the October thread named "notification of NSSlider end of tracking". -- James

Re: Custom NSSlider?

2008-12-01 Thread Kevin Gessner
What if you handle the label via bindings, but your long process via the target/action? Then you could use -[NSSlider sendActionOn:] (inherited from NSControl) with NSLeftMouseUpMask to only send the action on drag end. It seems like this would work for a slider, though I'm not sure i

Custom NSSlider?

2008-12-01 Thread Jean-Nicolas Jolivet
I was wondering if its possible to have an NSSlider send an action after the user finished dragging, while still providing continuous updates? The thing is, when the slider value changes, there's a considerably long process that will take place so I can't set my slider to conti

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Sherm Pendley
On Nov 27, 2008, at 7:24 PM, Graham Cox wrote: Yep, that's a potentially more serious issue. It would be nice if a category had a way to check for an existing implementation and quietly no-op itself. Just checking respondsToSelector: doesn't work of course, always returning YES. Build you

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
crollwheel. Also, if Apple were to add this method to NSSlider, surely it would just be part of the class definition for it, rather than in a separate category? If so, my category would always prevail. If it were added in a category, it would be pot-luck whose version prevailed, which is

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael Ash
On Thu, Nov 27, 2008 at 7:24 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > >> Please don't do this! It will apply to every single slider in your >> process, even ones you didn't create yourself, > > Well, that is potentially a "feature". I guess the point would be to test > your UI thoroughly and mak

  1   2   >