Re: Core Data and @count keypath
Re: Core Data and @count keypath
- Subject: Re: Core Data and @count keypath
- From: "John R. Timmer" <email@hidden>
- Date: Tue, 07 Feb 2006 07:30:38 -0500
You have to bind to a value that's read/write. @count is read only.
If you need to bind to it, make a managed object key like arrayCount
that returns the count in the getter method, and does nothing in the
setter method.
JT
On Feb 7, 2006, at 2:14 AM, GbT wrote:
Hi,
I have a core data app with some entities, the entity A has a to-many
relationship with another entity B. I use an nstreecontroller for A
and want to display the number of records for the relationship A-->>B,
but if I put relationshipToB.@count in the model key path in the
bindings I obtain this message:
*** NSRunLoop ignoring exception '[<_NSFaultingMutableSet 0x3c5d30>
addObserver:forKeyPath:options:context:] is not supported. Key path:
@count' that raised during posting of delayed perform with target
37e980 and selector 'open:'
The selector open is related to the drawer... but the addObserver
thing isn't clear to me...
My entities are all subclassed by NSManagedObject.
____________________________________
Science writer, Ars Technica (among other things)
http://arstechnica.com/journals/science.ars
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden