I'd like to use bindings for a toggle control and I can't work out
how best to do it.
I have a state dependent control that appears in the menu and as a
push button, so I'd like to use a controller. The thing is that I
want to change the selector and the title of the button to show the
action automatically (same for the menu I guess). I can't see a way
to do this via the bindings options.
To make it a little more concrete, what I'm looking at is a Play/
Pause button that
- displays "Play" and is bound to -play: when -isPlaying is NO
- displays "Pause" and is bound to -pause: when -isPlaying is YES
So I thought a controller with 2 key paths would do the job but I
can't see how to coerce NSObjectController to do this for me. Is this
trivial? Or do I have to code it up?