Re: encoding vended objects
Re: encoding vended objects
- Subject: Re: encoding vended objects
- From: "James Trankelson" <email@hidden>
- Date: Wed, 29 Aug 2007 10:36:00 -0400
Thanks!
I also tried sending a an NSArray of NSString objects, which failed as
well. Does anyone know why this might happen?
brian
On 8/29/07, Jacob Engstrand <email@hidden> wrote:
>
> 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
>
_______________________________________________
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