I save an NSMutableArray using
I open it using this:
Whatever nodes' original count is, it is 16 when I open it, and its contents have been destroyed. What is the problem?
Code:
[manager createFileAtPath:[NSString stringWithFormat:@"%@/%@", [url path], [savePanel nameFieldStringValue]] contents:[NSData dataWithBytes:nodes length:sizeof(*nodes)] attributes:nil]
Code:
NSData* data;
if(!(data = [manager contentsAtPath:[url path]])){
NSLog(@"Error was code: %d - message: %s", errno, strerror(errno));
return;
}
nodes = [data bytes];
NSLog(@"%i\n", [nodes count]);