Show count of Core Data to-many relationship in NSTableView cell with bindings?
Show count of Core Data to-many relationship in NSTableView cell with bindings?
- Subject: Show count of Core Data to-many relationship in NSTableView cell with bindings?
- From: Steve Mills <email@hidden>
- Date: Fri, 06 Feb 2015 01:43:48 -0600
I have a Core Data entity called Keyword that has a to-many relationship to another entity called Image. In a table that displays these Keywords, I want one column to show the number of Images that use that particular Keyword. I tried setting the Value binding for the Table View Cell to bind to the Table Cell View with model key path of objectValue.images.count. That doesn't work - throws an exception:
[<_NSFaultingMutableSet 0x6200000246e0> addObserver:forKeyPath:options:context:] is not supported. Key path: count
Is it not possible to bind to an entity's relationship properties? The Keyword class has a property named assets of class NSSet, so it seems like the binding should be able to access it just like the attribute properties.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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