Re: Key Paths @count and mutablestrings
Re: Key Paths @count and mutablestrings
- Subject: Re: Key Paths @count and mutablestrings
- From: Amy Heavey <email@hidden>
- Date: Wed, 5 Nov 2008 20:45:11 +0000
On 4 Nov 2008, at 17:32, Benjamin Stiglitz wrote:
PurchaseOrder is an Entity, with a relationship called products to
the
PurchaseOrderItems Entity which lists the actual items on the
order. I'd
like a column in my Purchase Order tabel to display the number of
items
in the order, so I've tried a number of different things along the
lines
of
Value: bound to Purchase Order Array Controller
arrangedObjects
@count.products
but I get the following error:
2008-11-03 18:41:44.928 powizard[8498] [<NSManagedObject 0x654a70>
valueForUndefinedKey:]: this class is not key value coding-
compliant for
the key @count.
…
How do I access the count of a to-many relationship?
You’ve got that backwards; you want “products.@count”.
I tried this at the time and it worked, but now I've made other
unrelated changes to the app and now it won't?
I've cleared out all my other code and associated problems, and I'm
at the same point, key path orderReference works, but products.@count
doesn't?
[Session started at 2008-11-05 20:42:25 +0000.]
2008-11-05 20:42:28.462 powizard[22921] [<_NSFaultingMutableSet
0x165e910> addObserver:forKeyPath:options:context:] is not supported.
Key path: @count
Thanks,
Amy
_______________________________________________
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