Re: Colors and NSUserDefaults
Re: Colors and NSUserDefaults
- Subject: Re: Colors and NSUserDefaults
- From: Jeremy Dronfield <email@hidden>
- Date: Tue, 9 Jul 2002 11:11:26 +0100
This still gives me the same error. I think there must be a problem
elsewhere. In the meantime, I'll stick with the NSArray I've been using
to store colour values - it's cumbersome, but adequate as a workaround
until I get to grips with archiving.
Thanks
Jeremy.
On Monday, July 8, 2002, at 08:03 pm, Guy Meyer wrote:
>
Hi
>
>
> I couldn't get it to work. The data seemed to save all right, but gave
>
> me a
>
> -initForReadingWithData: nil argument error on opening.
>
>
You should retain the color object after unarchiving it, otherwise it
>
is autoreleased before yo access it.
>
>
gridColor_=[[NSUnarchiver unarchiveObjectWithData:[netDefault
>
objectForKey:GridColor]] retain];
>
>
Cheers
>
>
Guy
_______________________________________________
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.