Re: NSArchiver question
Re: NSArchiver question
- Subject: Re: NSArchiver question
- From: Will Mason <email@hidden>
- Date: Sun, 24 Apr 2005 15:49:06 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
> However, it seems NSArchiver does not have methods for archiving
> basic
> C types (for example, there is encodeInt:forKey but there is no
> encodeInt:). So what is the proper way to encode the primitive C
> types
> with NSArchiver? Is it the encodeBytes:length: method? Or maybe I
> have missed something obvious?
You can just use encodeValueOfObjCType:at:, like this:
// archiver is an instance of NSArchiver
int value = 12;
[archiver encodeValueOfObjCType: @encode(int) at: &value];
Take care,
Will
_______________________________________________
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