views:

24

answers:

1

I've got an XIB window that I'm working with in Interface Builder. It has an NSScroller and 4 popups. The controller class has a float and 4 ints.

I bound the scroller to the float and the pupups to the ints, binding the value of the scroller and the selected index of the popups.

When I move the scroller, or change the popup selection, the ints and float change exactly as expected.

However, when I change the ints and float in the code (To initialize them for example) the UI elements don't change.

All of the ints and float are properties, properly synthesized.

Am I missing something really dumb?

+1  A: 

There could be one of several things wrong.

First, by "binding" do you mean that you are using Cocoa bindings? If so, do you have an Object Controller in the NIB file that arbitrates between your UI elements and your data holding code? That is generally required.

When you say "when I change the ints and floats in code", how are you changing them? If you are setting the instance variables directly, you are bypassing any change monitoring mechanisms.

Post some code.

bbum
Oh, yeah, Duh. I was just setting the variables, not calling setters... replace brightness = 200 with self.brightness = 200 and it seems to work! thanks!
Brian Postow