NSArrayController
NSArrayController
- Subject: NSArrayController
- From: Johan Kool <email@hidden>
- Date: Sun, 4 Jul 2004 23:57:46 +0200
Hi Matt,
Here is some sample code:
- (BOOL)writeToFile:(NSString *)path ofType:(NSString *)docType
{
return [[mainArrayController content] writeToFile:path
atomically:YES];
}
- (BOOL)readFromFile:(NSString *)path ofType:(NSString *)docType
{
[mainArrayController setContent:[NSArray
arrayWithContentsOfFile:path]];
return YES;
}
This of course only works with your own XML files. If you want to parse
other XML files, take a look at the documentation for NSXMLParser.
Hope that helps! Cheers,
Johan
Op 4 jul 2004 om 23:43 heeft email@hidden het
volgende geschreven:
Van: Matt Jarjoura <email@hidden>
Datum: 4 juli 2004 23:42:04 GMT+02:00
Aan: Cocoa Dev <email@hidden>
Onderwerp: NSArrayController
Is there an easy way to use NSDocument to parse a file into an
NSArrayController? Do I need to subclass NSArrayController?
-Matt
_______________________________________________
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.