Didn't expect to be posting again so soon, but here I am.
I'm trying to save and load from a text file. I set up a text file in my documents folder and can save to it,
#import "save.h"
@implementation save
NSString *path=@"/Users/nate/Documents/test.txt";
NSString *data;
- (IBAction)loadid)sender {
}
- (IBAction)saveid)sender {
data=[field stringValue];
[data writeToFileath atomically:NO];
}
@end
(The text is definitely saving; I checked with textedit)
but I can't find any way to load. I'm looking under NSData but there is no readFromFile:Atomically: or anything like that.
I'm trying to save and load from a text file. I set up a text file in my documents folder and can save to it,
#import "save.h"
@implementation save
NSString *path=@"/Users/nate/Documents/test.txt";
NSString *data;
- (IBAction)loadid)sender {
}
- (IBAction)saveid)sender {
data=[field stringValue];
[data writeToFileath atomically:NO];
}
@end
(The text is definitely saving; I checked with textedit)
but I can't find any way to load. I'm looking under NSData but there is no readFromFile:Atomically: or anything like that.