Re: encoding vended objects
Re: encoding vended objects
- Subject: Re: encoding vended objects
- From: Jacob Engstrand <email@hidden>
- Date: Wed, 29 Aug 2007 11:46:48 +0200
On 29 aug 2007, at 11.38, Jacob Engstrand wrote:
- (id)initWithCoder:(NSCoder *)decoder
{
self = [super initWithCoder: decoder];
if (nil != self) {
distance = [decoder decodeObject];
duration = [decoder decodeObject];
dateFor = [decoder decodeObject];
}
return self;
}
Oh yes, I forgot, those decoded objects need to be retained.
- (id)initWithCoder:(NSCoder *)decoder
{
self = [super initWithCoder: decoder];
if (nil != self) {
distance = [[decoder decodeObject] retain];
duration = [[decoder decodeObject] retain];
dateFor = [[decoder decodeObject] retain];
}
return self;
}
jak
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden