2 Beginner Bindings Questions
2 Beginner Bindings Questions
- Subject: 2 Beginner Bindings Questions
- From: Peter Zegelin <email@hidden>
- Date: Wed, 3 Nov 2010 17:08:36 +1100
I have two instances of the same tableview and controller that I am keeping synchronised via bindings to a common array. I have this working, in that I can add items via a button in one view and the other view instantly updates. Same with deleting selected items using [arrayController delete] via a button in each view. However I am having great difficulty showing the same selection of items using bindings. I would basically like to select rows in one table and have the selection updated in the other.
Pretty well everything I have tried either causes an exception or does nothing.
In the TableView I have tried binding the SelectionIndexes using various combinations of the selection based Controller Keys with various Model Key Paths ( including none ).
I have also done some things with the Selection Indexes in the ArrayController bindings as well.
So my question is - just what combination is required to get this to work?
My array is very simple with just some strings added. The tableviews are single column with description for the identifier and the table column is bound using arrangedObjects as the Controller Key and
description as the Model Key Path
My other question is related. I would like to enable the delete button only if there is a selection in the table. Again, I have tried binding the enabled property of the button to the controller with various combinations of Controller Key and Model Key Path, with no luck.
I have also done some google searches but nothing of any real help.
I am sure I'm missing something simple so any help here would be great!
cheers,
Peter_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden