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

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

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

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