Binding NSGridView

I am updating code which has a lot of NSMatrix button arrays. My UI has a binding to "selectedTag" (from NSControl) which is deprecated. Notes on NSMatrix say to use a containing view (say, NSGridView) and add the same action to all buttons. But this doesn't help the binding issue because NSGridView has nothing to bind. Any Ideas?


Addendum: In spite of doing a non-fruitful search before I posted, I fould the same question asked elsewhere, but no answer. https://forums.developer.apple.com/message/80244#80244. I just can't imagine removing this capability without providing something equivalent.

Replies

Well, you may regret that NSMatrix is deprecated, but that's life and there is little you can do against.


Your code is 4 years old, so not totally surprising things have to be updated.


Why do you need absoluteley to restore bindings ?

Could you describe precisely which bindings you would like to create ?


I understand it is to get radio button effect ?


May be you could take a different approach:

- Use NSGridView as advised

- Create your NSButtons in this grid, with radio style and type

- Assign them the tag you want

- Connect each button to the same IBAction, that will automatically create the radioButton effect


If that's not OK, please explain more precisely what you want to achieve (with or without binding)

This is a rather sophisticated program to do and record classroom/business presentations, then upload to a web server. It has many options, depending on intended use. As such, it often has multiple control groups for the same functions, and multiple display windows with same or similar content, all of which must be synchronized. The UI is totally (and I mean totally) bindings based. View controllers are mostly generic NSViewControllers using reprsentedObject for bindings.


Graphic arrays are used for many things, such as tool selection, color pallets, pen/eraser sizes, display options, and others. Lots of popovers. Most bind NSMatrix (NSControl) "selectedTag" for binding. I was hoping I could just make changes using Interfacebuilder in XCode. But without a bindable property, that doesn't work.


I hope they are not considering forcing us to a iOS type architecture without bindings. IMHO, bindings are one of the best things they ever did.