How do I make a table view column show a sum calculated from Core Data Values?

I have a Budget entity with a to-many relationship of BudgetItems. In a table 
view listing my budgets, I want a column that displays the total of a budget's 
items' amounts.

I tried binding the column to ite...@sum.limit, but got this error:
Unknown.m:0: error: -[BudgetTests testBudgetSheet] : [<_NSFaultingMutableSet 
0x102e28500> addObserver:forKeyPath:options:context:] is not supported. Key 
path: @sum.limit
..so I take it the particular NSSet variant used by Core Data doesn't support 
observing @sum. Or did I do that wrong?

I also tried implementing keyPathsForValuesAffectingTotal on my budget class to 
return "items.limit", but that didn't get me any notifications when things 
changed.

The next thing on my agenda is to try manually observing all changes to 
BudgetItems, but I'm struggling with the best way to do that.

-- 
David Catmull
uncom...@uncommonplace.com_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to