Disable NSButton when multiple items selected - Cocoa Bindings
<p>I'd like to disable a NSButton when multiple items are selected in a <code>NSTableView</code> which is connected to a <code>NSArrayController</code>. I know I can easily disable a button when nothing is selected (binding to <code>@count</code>), but I'm not sure how to reverse that so that <code>@count</code> has to be == 1 to be enabled.</p>

<p>I am using Swift, but I'm more interested in the best method than a language specific implementation (unless the difference between Swift and Objective C is a big one in this instance). </p>

<p>How can I use Cocoa Bindings to disable a <code>NSButton</code> if the selection includes more than one row? </p>