Bindings Question

Hi All,
I have a conceptual, bindings question for you. Lets say I want to hide a text field if the first item in a pop up is selected. It’s pretty straight forward to do so by binding the textfield’a “hidden state” to a property and adding some code. However, I was wondering if it’s possible to do this purely within IB. It seems that it should be possible, but I couldn’t figure out how to do it.

I don’t think it’s possible wholly in IB because you need some property to bind it to. But you can do it with just a property declaration and no other code. Just bind the text field’s hidden to a property with a value transformer of NSNegateBoolean, and bind that same property to the popup’s Selected Index.


Nice. I hadn’t thought of that. This opens up a whole bunch of possibilities. Thanks.