Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sergio10

macrumors regular
Original poster
Oct 3, 2007
137
0
Hi,
I use Object Controller in xcode 3.1 for the control bindings.

I want that edit field control shows my slider position when drag it.

How do I know what exactly value I need to bind in Binding Inspector of the Interface Builder("stringValue", "value" or "floatValue") ?
hCtOIctPo2.png


Thanks,
Sergio
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
I'd bind both your text field and slider to either file's owner or an object controller to the same value. Bindings don't work from a UI object to another, they work from a UI object to a controller.
 

Sergio10

macrumors regular
Original poster
Oct 3, 2007
137
0
I mean how to know that max slider position parameter is "maxValue" not "MAX_VALUE" or something else? Where can I see controls name convention parameter when I bind it via Interface Builder?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
While bindings can do this, you can't bind a control directly to another with this approach. I would suggest reading through the intro to bindings.

What you can do is control-click your slider and drag to the text field, and then select "takeIntegerValueFrom:" (or one of the other similar methods). You can then select on the slider attributes inspector "Continuous" for it to update instantly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.