NSArchiver? try again
NSArchiver? try again
- Subject: NSArchiver? try again
- From: "Mark's Studio" <email@hidden>
- Date: Thu, 30 Aug 2001 10:19:19 +0200
I'll try again
How to save more than one object?
I have made 2 Classes Object1 and Object2 with all the NSCoder stuff
and in MyDocument i have one NSMutableArray Object1DB and that works
fine.
But now i have another NSMutableArray Object2DB
but i can't figure out how to setup dataRepresentationOfType and
readFromFile if i have more than one object.
- (NSData *)dataRepresentationOfType:(NSString *)aType
{
return [NSArchiver archivedDataWithRootObject:Object1DB];
}
- (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)docType
{
[self setObject1DB:[NSUnarchiver
unarchiveObjectWithFile:fileName]];
return YES;
}
Thanks
Peter Mark
Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden