Sorry if that wasn't clear.
The first two lines in the sample code (the ones in black) were supposed to be the guides. While the blue code is the new code. I cut out a lot of the method to save space. I'd hoped the initial two lines gave enough context--but I could probably use a bit more to make it clear.
Thanks,
-Rich-
The text states to add the following code to initWithFileURL:, however does not specifically state where to insert this code. The file is WeightHistory.m, and the specific location is within the if conditional block, so that initWithFileURL: completed is...
- (id)initWithFileURL:(NSURL *)url
{
self = [super initWithFileURL:url];
if (self)
{
// Set an initial defaults
_weightHistory = [[NSMutableArray alloc] init];
// Monitor document state
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(documentStateChanged:) name:UIDocumentStateChangedNotification object:self];
}
return self;
}