Re: Problem in using NSKeyedUnarchiver for my custom class

2008-09-29 Thread Eric Gorr
name = [NSString stringWithString:aString]; is creating an autoreleased string. If you want to keep it around, you will need to: [name retain]; and similarly with your height setter. I believe this will solve your problem. Can you use or are you using Obj-C 2.0? If so, I would suggest l

Problem in using NSKeyedUnarchiver for my custom class

2008-09-29 Thread Adil Saleem
Hi, I am trying to write instances of a class (subclass of NSObject) in an array and then write them to a preferences files using NSKeyedArchiver. It does so successfully. After i unarchive it using NSKeyedUnarchiver, it reads the contents in the array. It also reports correct no. of objects of