Re: Core Data: adding a child data element, saving... 'Selector Not Recognized'
Re: Core Data: adding a child data element, saving... 'Selector Not Recognized'
- Subject: Re: Core Data: adding a child data element, saving... 'Selector Not Recognized'
- From: "Frederick C. Lee" <email@hidden>
- Date: Tue, 4 Apr 2006 16:38:34 -0700
The MapManagedObject has an encoding procedure to archive a transient
image:
- (void)willSave {
NSImage *image = [self primitiveValueForKey:@"image"];
if (image != nil) {
[self setPrimitiveValue:[NSArchiver
archivedDataWithRootObject:image]
forKey:@"imageData"];
}
else {
[self setPrimitiveValue:nil forKey:@"imageData"];
}
[super willSave];
}
===============
This worked BEFORE I hooked up a child MO to MapManagedObject.
But why would a new MO affect this?
The child MO is merely an instantiated NSManagedObject, connected to
MapManagedObject.
Ric.
On Apr 4, 2006, at 1:43 PM, mmalcolm crawford wrote:
On Apr 4, 2006, at 12:03 PM, Frederick C. Lee wrote:
This is what I got when attempting to SAVE a MOC after adding a
daughter MO:
*** -[MapManagedObject encodeWithCoder:]: selector not recognized
[self = 0x39d7500]
^^^^^^^^^^^^^^^^
Question: What could be the problem 'selector' in this case?
encodeWithCoder:
It's not clear why you're trying to encode a managed object?
Is it possible you have an image as an attribute in a Map entity or
somesuch and you're trying to follow the directions here for Non-
Standard Attributes (<http://developer.apple.com/documentation/
Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html>)? Are you
trying to archive the managed object instead of an attribute of the
managed object?
mmalc
_______________________________________________
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