NSArchiver?
NSArchiver?
- Subject: NSArchiver?
- From: "Mark's Studio" <email@hidden>
- Date: Wed, 29 Aug 2001 09:59:26 +0200
How to save more than one object?
In MyDocument i have one Object1DB and i can read and write that but i
can 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