NSKeyedArchiver selector not recognized
NSKeyedArchiver selector not recognized
- Subject: NSKeyedArchiver selector not recognized
- From: Scott Frankel <email@hidden>
- Date: Fri, 5 May 2006 09:14:06 -0700
I'm trying to implement archiving. My app goes through the motions
of presenting a Save browser, &c., but no file is written to disk.
The debugger shows that the object I'm trying to archive (an
NSMutableArray object) contains member object data.
XCode's Run Log posts the message:
[NSKeyedArchiver archiveDataWithRootObject:]: selector not recognized
The following snippet was built using examples in Hillegas' &
Davidson's books:
- (NSData *)dataRepresentationOfType:(NSString *)aType
{
[fooController commitEditing];
return [NSKeyedArchiver archiveDataWithRootObject:foo];
}
foo is the NSMutableArray object. The objects foo contains are
derived from a class in which I've implemented -encodeWithCoder: for
each of its data objects.
I note, however, that the compiler returns a warning:
'NSKeyedArchiver' may not respond to '+archiveDataWithRootObject:'
Is this indeed the source of the problem? How would I convince the
archiver to respond? What might the issue be with the NSData
method's selector (listed above)?
Thanks in advance!
Scott
_______________________________________________
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