> On 17 Dec 2014, at 18:32, Jerry Krinock <[email protected]> wrote:
>
>
>> On 2014 Dec 17, at 02:02, Gerriet M. Denkmann <[email protected]> wrote:
>>
>> A TableView with an ArrayController which has an Array of
>> MutableDictionaries; keys corresponding to TableColumns.
>> The table is editable and the dictionary of the edited row gets changed.
>>
>> But I want to know when any value of any row has been changed by the user,
>> in order to update some data.
>> This looks like a very common problem. So probably it has a very simple
>> solution.
>
> The short answer is that, yes, this is common and the solution is to bind the
> Content of your array controller to your data model using Cocoa Bindings. I
> don’t know if your Data Model is the "Array of MutableDictionaries” or the
> “some data”. We need more detail to give a better answer.
I did:
[ myArrayController addObserver: self
forKeyPath: @"arrangedObjects"
options: 0
context: NULL
];
But editing some value in some row does NOT trigger this.
Works fine when I observe "selectionIndexes" instead.
But I need to know when the content of the arrangedObjects (some value in some
MutableDictionary) has changed.
TableView has textDidEndEditing, but this is deprecated.
The delegate has ...shouldEditTableColumn... but I need ...didEdit...
The table is cell-based.
What else to try?
Gerriet.
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]