Re: Select model objects with NSTableView using cocoa bindings

2011-10-14 Thread Luc Van Bogaert
On 14 Oct 2011, at 00:21, Quincey Morris wrote: > On Oct 13, 2011, at 13:44 , Luc Van Bogaert wrote: > > Use a NSIndexSet property instead of a NSMutableIndexSet, and change the > property by assigning it a new (immutable) index set -- that is, via the > setter. > This works! Thanks for your

Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Quincey Morris
On Oct 13, 2011, at 13:44 , Luc Van Bogaert wrote: > Thanks, I got this working in one 'direction', ie. when the selection in the > table is changed, this is reflected in my UI and the 'selected' Dot objects > are drawn in a different color. For this, I decided to use a > NSMutableIndexSet 'dot

Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Luc Van Bogaert
On 12 Oct 2011, at 23:22, Quincey Morris wrote: > On Oct 12, 2011, at 13:31 , Luc Van Bogaert wrote: > >> I'm wondering if I should create a NSIndexSet property in my model object >> and bind it to the NSArrayController's 'selectedIndexes' key? > > Yes, but you've got the terminology wrong. The

Re: Select model objects with NSTableView using cocoa bindings

2011-10-12 Thread Quincey Morris
On Oct 12, 2011, at 13:31 , Luc Van Bogaert wrote: > I'm wondering if I should create a NSIndexSet property in my model object and > bind it to the NSArrayController's 'selectedIndexes' key? Yes, but you've got the terminology wrong. The relevant concept here is a binding name, and it's "select

Select model objects with NSTableView using cocoa bindings

2011-10-12 Thread Luc Van Bogaert
Hi, In my program window, I have some kind of 'inspector' panel, containing an NSTableView object, bound to an NSArrayController, which in turn is bound to a NSMutableArray of DotController objects. These DotControllers control Dot objects, which are custom view objects. Adding or removing Do