1

I'm trying to have a table column to display the sum of child values using the IB. I'm not sure if this is doable though.

So I have my Core Data bind to a table and a column of "total sales amount" that should be a total of the sales of the parent object.

I'm trying to do it like this:

"departments.@distinctUnionOfSets.sales.@sum.amount" in the "Model Key Path" of the Table Column Binding in IB.

Is there any example or tutorial on how to do this.

Teo Choong Ping
  • 12,512
  • 18
  • 64
  • 91
  • That looks right to me. What problem are you having? – Peter Hosey Nov 23 '09 at 19:56
  • I keep getting this error: 2009-11-23 23:44:41.864 ClosingTime[3301:a0f] HIToolbox: ignoring exception '[<_NSFaultingMutableSet 0x10031c000> addObserver:forKeyPath:options:context:] is not supported. Key path: @distinctUnionOfSets.sales.@sum.amount' that raised inside Carbon event dispatch – Teo Choong Ping Nov 23 '09 at 23:19
  • @SeymourCakes I'm having the same issue (http://stackoverflow.com/questions/18333711/cocoa-bindings-get-sum-for-an-attribute-for-all-children) did you find a solution? – Mikael Aug 20 '13 at 12:25
  • possible duplicate of [Using KVC operator e.g., @unionOfSets/@sum in IB's Value Binding Model Key Path](http://stackoverflow.com/questions/1800973/using-kvc-operator-e-g-unionofsets-sum-in-ibs-value-binding-model-key-path) – jscs Feb 20 '15 at 06:16

0 Answers0