encoding/decoding objects with mutablearray as property
Hi i've been searching quite some time for an example of how to encode/decode the following structure:
@interface myDataModelType : NSObject {
//datafile versioning properties
double dataVersion;
NSString *name;
int ID;
BOOL someBool;
NSMutableArray *myMutableArray;
}
I got this working as far as that it encodes/decodes objects of this class.
I can both encode/decode the name, int bool. but i cannot find any example that makes clear to me howto decode/encode the mutablearray property of this class...
i tried with decodeObjectForKey but this does not return me "the array object" with alle the records.. i red from the documentation that pointers aren't encoded, but i cannot find anywhere how it IS done instead..
Anyone succesfully implemented this? Thanks in advance..
EDIT: as it seems.. i had other bugs in my App. fixing them showed me that archiving an array as object was the way to go..
Last edited by EeKay; 11-30-2008 at 10:45 AM.
|