Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread dangerwillrobinsondanger
> On Apr 8, 2016, at 7:32 PM, Graham Cox wrote: > > By exposing the bindings that an object supports and creating an Interface > Builder palette, you can make instances of your own classes bindable in > Interface Builder.” > > If this information is still correct,

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Nivek Research
For anyone interested I decided to implement a subclass of NSObjectController. Each NSMatrix object is removed from the NIB and replaced with individual NSRadioButtons. I then add an NSObjectController instance to the NIB for each NSMatrix replaced and set its class to RadioGroupController. I

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 10:32 PM, Graham Cox wrote: > > Your controller might, and could effect the binding in code, using -[NSObject > bind:toObject:withKeyPath:options:] and an outlet to the group view. As work > goes, that’s pretty minimal, and affects only the

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 10:05 PM, Nivek Research wrote: > > Hi Graham, > I believe the part you are missing is the ability to use bindings and ideally > bindings setup in IB. So, according to the documentation: "NSView subclasses can expose additional

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Nivek Research
Hi Graham, I believe the part you are missing is the ability to use bindings and ideally bindings setup in IB. The bulk of Sean McBride’s code simulates the binding behavior of NSMatrix (i.e., keeping a model property in sync with the visual display and vice versa) and his code does this only

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 8:44 PM, Graham Cox wrote: > > Off the top of my head I can imagine how this code would look and with due > respect to Sean, it would be a lot less complicated than RRRadioBinder. OK, here’s what I had in mind. Super simple, tested and works, though

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 7:55 PM, Nivek Research wrote: > > The code Sean McBride provided shows the lengths one has to go to in order to > approximately replace the binds offered by NSMatrix. Again, I am not opposed > to the work, but it does seem like a giant leap

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Nivek Research
Reworking the view controller to have a bunch of outlets to buttons is what I am trying to avoid. The original implementation simply bound the radio group (NSMatrix) either to a numeric property or to an object property on the model. The code Sean McBride provided shows the lengths one has to

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread dangerwillrobinsondanger
> On Apr 8, 2016, at 3:37 PM, Shane Stanley wrote: > > But that doesn't help with the problem of bindings for selectedIndex, does it? The point is you create a different property that gets set by the action method. Bind to that property. It reduces code but

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread dangerwillrobinsondanger
It's hard to find. asciiwwdc site makes it discoverable. As far as I can tell it was only there (so in a video) but might be in some release notes though those often don't show up in searches. The programming guide docs are generally woefully out of date for controls that don't come inside of

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 4:37 PM, Shane Stanley wrote: > > But that doesn't help with the problem of bindings for selectedIndex, does it? > Well, it provides you with a behaviour that is then trivial to leverage to get the bindings behaviour you need - just make a

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Shane Stanley
On 8 Apr 2016, at 9:23 AM, Graham Cox wrote: > > If you have a bunch of “naked” radio buttons, all having the same target and > selector (but presumably different tags, so you can distinguish them), they > will automatically act as a group. But that doesn't help with

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Graham Cox
> On 8 Apr 2016, at 5:36 AM, Nivek Research wrote: > > I have a number of NSMatrix instances that group radio buttons. Most bind the > selectedIndex or selectedTag bindings available on NSMatrix to a numeric > value in a model object. The others bind the

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Jeff Szuhay
Last week, I filed a sample code bug #25499365 against the ButtonMadness sample code project. I’m not sure if that will be enough. > On Apr 7, 2016, at 1:26 PM, Sean McBride wrote: > > On Thu, 7 Apr 2016 15:36:51 -0400, Nivek Research said: > >> I have a number of

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Sean McBride
On Thu, 7 Apr 2016 15:36:51 -0400, Nivek Research said: >I have a number of NSMatrix instances that group radio buttons. Most >bind the selectedIndex or selectedTag bindings available on NSMatrix to >a numeric value in a model object. The others bind the contentObjects >and selectedObject binding

Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Nivek Research
I have a number of NSMatrix instances that group radio buttons. Most bind the selectedIndex or selectedTag bindings available on NSMatrix to a numeric value in a model object. The others bind the contentObjects and selectedObject binding available on NSMatrix. As NSMatrix is informally