Re: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Runtime error
Re: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Runtime error
- Subject: Re: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Runtime error
- From: Carlos Rivera <email@hidden>
- Date: Tue, 11 Oct 2005 22:30:35 +0800
I don't think so. I am using the accessor from the class that was created
from the Data Modeler. The accessor returns an NSManagedObject ( [self car]
). That is what puzzles me the most.
On 10/11/05, Jonathon Mah <email@hidden> wrote:
>
> Carlos,
>
>
> On 2005-10-11, at 21:18, Carlos Rivera wrote:
>
> > I have two entities specified in XCode{Trip, Car}. Trip has a 1 to 1
> > relationship with Car, while Car has 1 to many to Trip. Now Car has
> > a property(totalDistance) which is dependent on the sum of all the
> > properties in each
> > Trip(distance).
> >
> > <snip>
> >
> > So everything compiles just fine but when I run and I change the
> > distance in Trip I get the following error:
> >
> > -observeValueForKeyPath:ofObject:change:context: only defined for
> > abstract class. Define -[NSManagedObject
> > observeValueForKeyPath:ofObject:change:context:]!
>
> It sounds like the argument passed to setCar: is not an instance of
> your Car class.
>
> Also, I don't remember the details, but I think Core Data has a built
> in mechanism for calculating aggregates of data (sum, average, max,
> min, etc.). In which case you don't need to handle it yourself.
>
>
> Jonathon Mah
> email@hidden
>
>
>
_______________________________________________
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