I want to bind the enabled state of an NSButton to whether or not an NSArrayController has any selected items.
How do I do this?
I want to bind the enabled state of an NSButton to whether or not an NSArrayController has any selected items.
How do I do this?
Generally speaking, binding the enabled
binding to the canRemove
property of the array controller should give you what you want. After all, you can only remove an object if there's one selected.