Re: NSKeyedArchiver selector not recognized
Re: NSKeyedArchiver selector not recognized
- Subject: Re: NSKeyedArchiver selector not recognized
- From: Gorazd Krosl <email@hidden>
- Date: Fri, 5 May 2006 12:33:45 -0400 (EDT)
Scott,
The proper selector is:
[NSKEyedArchiver
archivedDataWithRootObject:some_object]
Note the extra "d"!
Cheers,
Gorazd
--- On May 5, 2006, at 9:14 AM, Scott Frankel wrote:
> 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 You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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