1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Using Object Controller for Binding

Discussion in 'Mac Programming' started by Sergio10, Mar 29, 2009.

  1. macrumors regular

    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") ?

  2. Moderator emeritus


    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.
  3. macrumors regular

    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?
  4. Moderator emeritus


    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.

Share This Page