0

I've been trying to get this to work for a while now.

In my Core Data model I have:

Entity Company has a one to many relationship with Employee (employees)

Company.employees
Employee.age

Using bindings I would like to show the sum of age for all employees when clicking on a Company in a tableView.

I've tried variations of: @distinctUnionOfSets.employees.@sum.age, but can't get it to work.
When I try the above I get the error message: [<_NSFaultingMutableSet 0x10019c430> removeObserver:forKeyPath:] is not supported. Key path: @sum.age

My NSArrayController is bound to Client so in IB it looks like this: Clients.selection.@distinctUnionOfSets.employees.@sum.age

Any ideas?

4

1 回答 1

0

我把它弄得比原来更复杂。添加了一个绑定到 Employee 的新 NSArrayController。

于 2013-08-20T12:42:52.110 回答