Re: Archiving ABPerson
Re: Archiving ABPerson
- Subject: Re: Archiving ABPerson
- From: "Dr. H. Nikolaus Schaller" <email@hidden>
- Date: Sat, 8 May 2004 14:52:02 +0200
I have to add that the method described below assigns a new uniqueId on
decoding, so that comparisons based on comparing the archived uniqueId
with the original will fail.
Nikolaus
Am 08.05.2004 um 12:27 schrieb Dr. H. Nikolaus Schaller:
I just rean into the same issue.
To me it appears that it is not a bug in addRecord: but in
initWithVCardRepresentation: as the message appears just when this
method is called.
A workaround is:
@implementation ABPerson (archiving)
- (void) encodeWithCoder:(NSCoder *) coder;
{
[coder encodeDataObject:[self vCardRepresentation]];
}
- (id) initWithCoder:(NSCoder *)decoder;
{
self=[self init]; // this call assigns a uniqueId
self=[self initWithVCardRepresentation:[decoder decodeDataObject]];
return self;
}
@end
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.