This would seem to imply that initWithCoder/encodeWithCoder should also use direct ivar access, but I have seen **both** used in reputable sources.
and from the binding examples on mmalc's page, this: ( I understand that the method is deprecated)
- (NSData *)dataRepresentationOfType:(NSString *)aType
{
// create an archive of the collection and its attributes
NSKeyedArchiver *archiver;
NSMutableData *data = "">NSMutableData data];
archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:self.name forKey:@"name"];
[archiver encodeObject:self.collectionDescription forKey:@"collectionDescription"];
[archiver encodeObject:self.collection forKey:@"collection"];
[archiver finishEncoding];
return data;
}
Is this just 6 of one and half dozen of the other?
Thanks.