Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Newbie: Bind controller values to a NSSlider

 
   Macintosh computer (Home) -> Programmer Help RSS
Next:  External DVD burner override?  
Author Message
e-Jah

External


Since: Feb 16, 2008
Posts: 1



(Msg. 1) Posted: Sat Feb 16, 2008 3:25 am
Post subject: Newbie: Bind controller values to a NSSlider
Archived from groups: comp>sys>mac>programmer>help (more info?)

Hi,

I just began to code a Cocoa application and I already met some
problems...

Just for the try I want try to bind some values in my controller to a
NSSlider.

I have created 3 float values, minVal, maxVal, curVal and I have
created the accessors.
In the interface designer i have selected my NSSlider, click on
"Slider Bindings" and for each values "Max Value", Min Value and Value
I have select "bind to: My Controller", and filled the Model Key Path
text field with my controller's values.

My problem is as long as I bind just the minVal and maxVal it seems
working (my application launch), but if I bind the curVal then the
application doesn't launch...

Do you have any idea ?

BTW if you have some good resources to learn to code under OS X I will
be glad you give them to me ^^

Thank you !

 >> Stay informed about: Newbie: Bind controller values to a NSSlider 
Back to top
Login to vote
Andrew

External


Since: Jul 29, 2006
Posts: 13



(Msg. 2) Posted: Sat Feb 16, 2008 10:34 am
Post subject: Re: Newbie: Bind controller values to a NSSlider [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-02-16 11:25:44 +0000, e-Jah said:

> Hi,
>
> I just began to code a Cocoa application and I already met some
> problems...
>
> Just for the try I want try to bind some values in my controller to a
> NSSlider.
>
> I have created 3 float values, minVal, maxVal, curVal and I have
> created the accessors.
> In the interface designer i have selected my NSSlider, click on
> "Slider Bindings" and for each values "Max Value", Min Value and Value
> I have select "bind to: My Controller", and filled the Model Key Path
> text field with my controller's values.
>
> My problem is as long as I bind just the minVal and maxVal it seems
> working (my application launch), but if I bind the curVal then the
> application doesn't launch...
>
> Do you have any idea ?
>
> BTW if you have some good resources to learn to code under OS X I will
> be glad you give them to me ^^
>
> Thank you !

I'm pretty new too, but I wonder if you've initialised a value for
curVal at any point.

 >> Stay informed about: Newbie: Bind controller values to a NSSlider 
Back to top
Login to vote
noreply

External


Since: Dec 02, 2004
Posts: 160



(Msg. 3) Posted: Sat Feb 16, 2008 10:34 am
Post subject: Re: Newbie: Bind controller values to a NSSlider [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

e-Jah wrote:

> I have created 3 float values, minVal, maxVal, curVal and I have
> created the accessors.
> In the interface designer i have selected my NSSlider, click on
> "Slider Bindings" and for each values "Max Value", Min Value and Value
> I have select "bind to: My Controller", and filled the Model Key Path
> text field with my controller's values.
>
> My problem is as long as I bind just the minVal and maxVal it seems
> working (my application launch), but if I bind the curVal then the
> application doesn't launch...

My first guess is that you are not binding the slider's value to your My
Controller object, but to some other object. If this is not the problem
you need to show us the code...

patrick
 >> Stay informed about: Newbie: Bind controller values to a NSSlider 
Back to top
Login to vote
David Phillip Oste

External


Since: Apr 25, 2004
Posts: 694



(Msg. 4) Posted: Sat Feb 16, 2008 6:36 pm
Post subject: Re: Newbie: Bind controller values to a NSSlider [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
,
e-Jah wrote:

> My problem is as long as I bind just the minVal and maxVal it seems
> working (my application launch), but if I bind the curVal then the
> application doesn't launch...

NSSlider probably wants an object as its value. Can you bind to
floatValue?
 >> Stay informed about: Newbie: Bind controller values to a NSSlider 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[cocoa newbie] invoking the action in an Controller connec.. - Hi, Currently I try to invoke an action in my Controller class when an file has been dropped to my NSImageView subclass (MyDropView). The MyDropView instance in my window is connected to the fileDropped: action in MyController. Unfortunately,..

Bind fails with an error port is in use. - Hi All, I have simple client server application using BSD sockets. Client is connected to server using LOCALHOST using TCP sockets. I have used SetSockOpt - SO_REUSEADDR before bind function. In particular case i am getting SetSockOpt functions..

NSSlider and sending - Hello, for a NSSlider one can set "Cont. send action while slidding" in IB. How can this be toogled while runtime? I there something like [slider setSendActionWhileSliding:YES/NO]; ? Thnaky and bye - Robert

NSSlider freeze other process? - I have a video running while using the NSSlider to control the speed. I notice that once I have the mouse down while dragging the slider, it stop my video until I release the mouse. Anybody know how I get it to work. I think there is some work around b...

How to make NSSlider have finer detail? - Hi, I've found a few apps that allow you to control an NSSlider in much finer increments if you hold the control key down while dragging it. I can't figure out how they do this as obviously the position of the mouse drag goes out of synch with the slide...
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]