I have 5 buttons and 5 text fields. I’d like to set up bindings so that button 1 is enabled only if textfields 2-5 have values….. button 2 is enabled only if textfield 1 & 3-5 have values, etc.
I’m just starting to learn about cocoa bindings. I was hoping I could use them to manage the enabling/disabling of the buttons. When I tried to set up an Enable binding on one of the buttons, it won’t let me reference the textfields.
Is this possible (and right) to do with bindings?
Bindings are not conditional, or at least rather opaque in this respect. You will have to do this in code. Check your text fields text change callbacks and enable the buttons accordingly. Should be just a few lines of code.