13 May 2010

Typo and an Omission

A typo on page 180 (middle of the page) reads "Then make the change shown in bold to the top of MainViewController.h:" It should be MainViewController.m:

Also, on page 183-4 he has us make new helper methods for the WeatherForecast object, but they were undeclared in the WeatherForecast.h file. We added these lines in WeatherForecast.h before the @end:
-(NSString *)fetchContent:(NSArray *)nodes;
-(void)populateArray:(NSMutableArray *)array fromNodes:(NSArray *)nodes;

3 comments:

  1. We did all the coding in the book (without adding those lines to WeatherForecast.h) and everything worked as it should, except for in the Now section our "Temp:" label gave us something like 0.000000(<WeatherForecast...). Does anyone have any suggestions to help?

    When we did add Tony's lines in WeatherForecast.h, we had the same result as we did without them.

    ReplyDelete
  2. Nevermind, our "Temp:" label problem is fixed. We re-coded the method, must have been a typo.

    ReplyDelete
  3. Objective-C seems to allow you to leave methods undeclared in your interface file if you're only using them inside the class -- something like private methods in C++ and Java.

    ReplyDelete