Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSMatrix with bindings is disabled

NSMatrix with bindings is disabled
Thread Tools
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Oct 21, 2004, 08:11 PM
 
I'm using Cocoa bindings to manage an NSMatrix of switches (checkboxes) and the associated data. I've bound it's "content" to an array controller and it shows the correct number of checkboxes all with the correct titles. That works nicely.

The problem comes when I want to manage which are selected (checked) and which are not.

To do this I've bound the NSMatrix' "selectedObjects" to an object controller with the model key path of an array which contains a subset of the objects in the array which is used for the "content" array controller.

Is this the way I'm supposed to set it up?

In any case, the only result of configuring the "selectedObjects" binding that I can see is that the NSMatrix is completely disabled (greyed out, and non-responsive) in the Application.

Any ideas as to what's going wrong? Or does nobody else use bindings?
     
Brass  (op)
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Oct 21, 2004, 08:31 PM
 
doh! How dopey can you get?

Of course the NSMatrix is disabled when there is no selection for the object controller from which it needs a selection. It's actually a fantastic feature that bindings does all this for me! Love it! Now when I actually make a selection, the NSMatrix becomes enabled, and I can selecte and deselect checkboxes to my hearts content.

BUT, it still isn't behaving correctly. Initially NO checkboxes are selected, and there should be some selected. Yet to figure out why this would be.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:28 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,