Re: Enable Unique Selection

2013-05-04 Thread Andy Lee
On May 4, 2013, at 12:54 AM, Gerriet M. Denkmann wrote: > Seems to me rather less code. Well sure, if you want to write *less* code. :) (To add to the "duh" factor, I know I wrote other value transformers on that project.) --Andy ___ Cocoa-dev mai

Re: Enable Unique Selection

2013-05-03 Thread Steven Degutis
Personally I would just use the value transformer approach. It's easy, obvious, and discoverable. Any other solution I can think up with would be lacking in at least one of these. I actually find value transformers to be super helpful when working with bindings. I've used one for an empty string (t

Re: Enable Unique Selection

2013-05-03 Thread Gerriet M. Denkmann
On 3 May 2013, at 17:07, Andy Lee wrote: > On May 3, 2013, at 1:29 AM, Gerriet M. Denkmann wrote: >> I have a button which only makes sense when exactly one thing is selected. >> Currently it's Enabled property is bound to Array >> Controller.selectedObjects.@count. >> I.e. the button is enabl

Re: Enable Unique Selection

2013-05-03 Thread Andy Lee
On May 3, 2013, at 1:29 AM, Gerriet M. Denkmann wrote: > I have a button which only makes sense when exactly one thing is selected. > Currently it's Enabled property is bound to Array > Controller.selectedObjects.@count. > I.e. the button is enabled if one or more things are selected. > > But I