Hi, i need some help with my xcode homework.
in the application, i have a textfield and a slider. The input in the textfield in integers (Age). and what i want to do is to synchronize the slider and the textfield.
I was able to change the value of the text when the slider moves, but i couldn't do it in reverse...

So basically the question is:

How to change the value of the slider depending on the value of the textfield. (and again, it's an integer)

Help is much appreciated.
Think of it outside the scope of Xcode. You're hooking the value of the texfield to the current position of the slider. Reverse, would be hooking the slider to the current value of the textfield. Hence you need to register a certain event ( lostfocus, action submitted, text changed). Look at the API for how to set the value of the slider and using glue code you'll be able to do it.

Pseudo wise:

texfield.addevent('lostfocus', lostfocus)
lostfocus(obj,arts){ slider.setcurrentposition(obj.text.toint()) }
xterm wroteThink of it outside the scope of Xcode. You're hooking the value of the texfield to the current position of the slider. Reverse, would be hooking the slider to the current value of the textfield. Hence you need to register a certain event ( lostfocus, action submitted, text changed). Look at the API for how to set the value of the slider and using glue code you'll be able to do it.

Pseudo wise:

texfield.addevent('lostfocus', lostfocus)
lostfocus(obj,arts){ slider.setcurrentposition(obj.text.toint()) }
I have everything set. i just need the code that changes dynamically the value of the slider
Let me get home. Mobile browsing sucks.
Isn't XCode Apple's IDE? I am guessing they have a GUI generator a la Visual Studio you're using. If you could tell me in what language the software is written, maybe I could help.

But first make sure that your event (lostfocus like xterm said) is properly detected by throwing in some alerts or using a debugger.
Platform is cocoa, language is objective C
Yorgi wroteI have everything set. i just need the code that changes dynamically the value of the slider
setFloatValue, inherited from NSControl