We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P2.0,
released 15 days ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| 19 |
|
#39736: mobi version does not display some text correctly. For example the text on page 19 of the pdf, second sentence under the section titled "Created the Hello iPhone Project":
"Choose File > New Project" displays as "Choose File T dew froject" in the mobi version on my Kindle DX.--Greg Cheong #39736: mobi version does not display some text correctly. For example the text on page 19 of the pdf, second sentence under the section titled "Creat ...more...
|
B14.0
29-Jun-09
|
|
| 24 |
|
#39581: enjoying working with your book.
found a small problem using the iphone in Unnamed Chapter page 24/28 4.94% into book or pdf book page 43
line 4 of the code runs of the screen in portrait and landscape as shown below
- (void) sayHello: (id) sender {
NSString* userName = nameField.text;
NSString* helloMessage =
[[NSString alloc] initWithFormat: @"Hel
helloLabel.text = helloMessage;
[helloMessage release];--Gary McWilliams #39581: enjoying working with your book.
found a small problem using the iphone in Unnamed Chapter page 24/28 4.94% into book or pdf book page 43
...more...
|
B14.0
21-Jun-09
|
|
| 47 |
|
#41989: The screenshot on page 47 shows the placeholder text as "Type your name", however, on page 45, the placeholder text is "Name", as is the example text in the first sentence on that page.--Yogi Patel #41989: The screenshot on page 47 shows the placeholder text as "Type your name", however, on page 45, the placeholder text is "Name", as is the examp ...more...
|
P1.0
03-Jan-10
|
|
| 52 |
|
#38815: in the .mobi version of this file (approximately location 620 on a Kindle), the 2nd graphic on PDF page 52 is 90% blank, with the real graphic taking up only a fraction of the page. Even zooming it results in a graphic that is too small to read.--Avram Dorfman #38815: in the .mobi version of this file (approximately location 620 on a Kindle), the 2nd graphic on PDF page 52 is 90% blank, with the real graphic ...more...
|
B11.0
09-Apr-09
|
|
| 54 |
|
#39197: This is an erratum for the formatting of the PDF, not the text of the book: The first page of this and every chapter is missing the "Report erratum" link at the bottom of the page. (I am using version 9.1 of Adobe Reader, but I've seen this with earlier PDFs, using version 9.0 of Adobe Reader.)
I simply clicked the "Report erratum" link on the next page, and subtracted 1 from the page number at the end of the URL, but it's enough of a nuisance to be worth fixing, in my opinion.--Richard Smiley #39197: This is an erratum for the formatting of the PDF, not the text of the book: The first page of this and every chapter is missing the "Report e ...more...
|
B13.0
15-May-09
|
|
|
69 |
#41990: In this example, we are linking the view in a xib file that we created ourselves for the first time. The oh-so-important line of text that tells the learner to make this connection is the last line of the 2nd paragraph. For people new to iPhone/Cocoa programming this is a HUGE deal and yet, it's given ONE line, one that could easily be missed.
I recommend expanding this line into a paragraph and bolding the text that tells the learner to hook this up. If it's missed, it will create headaches galore. If it's misunderstood, it's a big hole in the learner's mental picture of how all the pieces are fitting together.--Elisabeth Robson #41990: In this example, we are linking the view in a xib file that we created ourselves for the first time. The oh-so-important line of text that te ...more...
|
P1.0
03-Jan-10
|
|
|
70 |
#41992: I suggest clarifying at the bottom of the page that the *title* text field should be configured to capitalize words. The box office gross is a number so it doesn't matter, and the summary should be configured to capitalize sentences. So it's really only the title that should have this configuration. Some clarity here would be helpful.--Elisabeth Robson #41992: I suggest clarifying at the bottom of the page that the *title* text field should be configured to capitalize words. The box office gross is ...more...
|
P1.0
03-Jan-10
|
|
| 75 |
|
#42063: Section 4.6, first sentence, reads: "Let’s now create a second view controller that we will use to manage the modal view." I think that should be *model* view, not modal view.--Marc Hedlund #42063: Section 4.6, first sentence, reads: "Let’s now create a second view controller that we will use to manage the modal view." I think that shoul ...more...
|
P1.0
11-Jan-10
|
|
| 79 |
|
#42260: Section 4.7 first screen shot from IB shows the incorrect class for the file's owner of the MovieEditorViewController. It shows Class set to MoveViewController instead of MovieEditorViewController. I figured it out from reading the text again after my expected outlets were missing..--Bill Dennis #42260: Section 4.7 first screen shot from IB shows the incorrect class for the file's owner of the MovieEditorViewController. It shows Class set to M ...more...
|
P2.0
07-Feb-10
|
|
| 86 |
|
#41859: There is a bug in the source code for chapter 5
Bug: Memory Leak
File: <base>/TableViews/MovieTabler02/Classes/RootViewController.m
Line: 56
Desc:
moviesArray = [[NSMutableArray alloc] init];
This is allocated but never released... --Steve McFarlin #41859: There is a bug in the source code for chapter 5
Bug: Memory Leak
File: <base>/TableViews/MovieTabler02/Classes/RootViewController.m
Line: ...more...
|
P1.0
17-Dec-09
|
|
|
86 |
#41942: First, in the last paragraph, "You might recall from Section 5.2 ... that in MainView.xib ...". There is no MainView.xib--this should be MainWindow.xib.
Second, this sentence doesn't make any sense in context, at least with SDK 3.2: "Then, on the right side of this assignment, notice the reference to self.editButtonItem." The context is that we are examining properties of UINavigationItem, and I can find nothing about self.editButtonItem in the right-click popup for this object or in the inspection palette. Either there is some text missing, or the SDK has changed since this bit was written.--Ben Fulton #41942: First, in the last paragraph, "You might recall from Section 5.2 ... that in MainView.xib ...". There is no MainView.xib--this should be MainW ...more...
|
P1.0
29-Dec-09
|
|
|
89 |
#42099: The book states "Add an instance variable MovieEditorViewController* movieEditor;"
The code has the asterisk prior to "movieEditor;" thusly "*movieEditor;"
The same is true of this statement "Movie *editingMovie;" but I couldn't find the page with the instruction that states "Movie* editingMovie;"--Ralph Barhydt #42099: The book states "Add an instance variable MovieEditorViewController* movieEditor;"
The code has the asterisk prior to "movieEditor;" thusly ...more...
|
P1.0
18-Jan-10
|
|
| 119 |
|
#42025: UITableViewCell method initWithFrame:reuseIdentifier: is deprecated in iPhone OS 3.0--Florian Maunier
|
P1.0
09-Jan-10
|
|
| 122 |
|
#42263: In the last paragraph it says: <br>
"Right-click the Classes group in Xcode, and choose Add > New File.
Choose to make a subclass of UITableViewController (select Cocoa Touch
Classes -> Objective-C class and then UITableViewController from the
pulldown), click Next, and then name your new controller DVDCabinet-
Controller."
<br>
YARRRRGGGHHHH the previous comment is right. Just create a UIViewController subclass -- yes, I know to the already informed that this may seem obvious, but to someone just learning it's frustrating!!!!
--Dave Colburn #42263: In the last paragraph it says: <br>
"Right-click the Classes group in Xcode, and choose Add > New File.
Choose to make a subclass of UITable ...more...
|
P2.0
07-Feb-10
|
|
| 130 |
|
#42264: Second paragraph ends with:
"The delegate adds the view defined by the tabBarController onto the window. Here is the code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:tabBarController.view];
[self createData];
}
This code is straightforward; we just ask the tab controller. . ."
This is confusing to me as a newbie to iPhone programming. The default value in the file that was created for me by Xcode is:
<<
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Add the tab bar controller's current view as a subview of the window
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
return YES;
}
>>
So now I'm confused about which one I need -- I'm moving ahead just adding the one you have in the book, but it would help to know that the exisitng one is ok too...
--Dave Colburn #42264: Second paragraph ends with:
"The delegate adds the view defined by the tabBarController onto the window. Here is the code:
- (void)app ...more...
|
P2.0
07-Feb-10
|
|
| 131 |
|
#42265: Page starts with:
<<der of the data for the other states is created in the same way and added
to the same data array but not shown.1
NSMutableArray *data = [NSMutableArray array];
[data addObject:[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:36553215], @"population" ,
@"California" , @"name" ,
[NSNumber numberWithInt:163770], @"area" , nil]];
After you create all the test data, you then need to set the states property
to the array you have just created. The code should look like this:
self.states = [NSArray arrayWithArray:data];
>>
<grrr> How 'bout consistency here??? I'm ok with you bending the paradigm of "here's the code, type it in" with regards to showing all the states (SUGGESTION: please use more than a footnote to indicate that you've bent the paradigm),
BUT, the last use of the code snippet
self.states = [NSArray arrayWithArray:data];
is breaking, not bending the paradigm. SUGGESTION: be very explicit about this one and tell us it's a code snippet you're showing...
--Dave Colburn #42265: Page starts with:
<<der of the data for the other states is created in the same way and added
to the same data array but not shown.1
NS ...more...
|
P2.0
07-Feb-10
|
|
| 134 |
|
#42069: I needed to explicitly connect the delegate and dataSource outlets on the TableView that is a child of the ByPopulationViewController for the example to work. The text mentions that you don't need to connect the view outlet, but it looks like the other two are still required.--David Parker #42069: I needed to explicitly connect the delegate and dataSource outlets on the TableView that is a child of the ByPopulationViewController for the ...more...
|
P1.0
12-Jan-10
|
|
| 156 |
147 |
#41872: In the loadFileContentsIntoTextView method the comment on line 6 reads
// read and dump to NSTextView
NSTextView is not available in Cocoa Touch, but UITextView is, so it should read
// read and dump to UITextView--Miranda Janell Ragland #41872: In the loadFileContentsIntoTextView method the comment on line 6 reads
// read and dump to NSTextView
NSTextView is not available in Cocoa T ...more...
|
P1.0
20-Dec-09
|
|
| 191 |
|
#41842: In loadprefs function, userTimeZone is assigned return value of method 'stringForKey' which is not alloc, new and copy but is released after simple assignment without retain call.
I think there should be some explanation about what happens behind the code. --Suhku Huh #41842: In loadprefs function, userTimeZone is assigned return value of method 'stringForKey' which is not alloc, new and copy but is released after s ...more...
|
P1.0
16-Dec-09
|
|
| 191 |
|
#41845: Your code for loading settings from the Settings.bundle is erroneous. The settings aren't created until you go to Home/Settings/Your App, so show24Hours is giving you back a result that may not be the default that you asked for. You need to supplement the code to account for this issue. Please do not use a text string to figure it out. While that's convenient for this example, it doesn't work if you don't have a string to look at (for instance, if you are using all toggles.) #41845: Your code for loading settings from the Settings.bundle is erroneous. The settings aren't created until you go to Home/Settings/Your App, so s ...more...
|
P1.0
16-Dec-09
|
|
| 196 |
|
#41757: None of the SQL in the SQLite chapter shows up on the Kindle DX in .mobi format--Greg Cheong
|
P1.0
08-Dec-09
|
|
|
227 |
#42188: The error is with the errata reporting on the website. For example, what is on p227 of P1.0 of the printed book is showing up on errata as if belongs to p236.
HOWEVER eratta seems to match up for p84. Maybe they are being mis-reported using the PDF page number instead of the top corner book page number
See for yourself: p227 of print book errata listed as 236
Look at this item on the website with P1.0 selected AND in a print version. #42014: There seems to be a memory leak under the "NSFetchedResultsChangeInsert" clause in -(void)controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:
The line
[self.tableView insertSections:[[NSIndexSet alloc] initWithIndex:0] withRowAnimation:UITableViewRowAnimationRight];
should instead read
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationRight];
--Les Cuff #42188: The error is with the errata reporting on the website. For example, what is on p227 of P1.0 of the printed book is showing up on errata as if ...more...
|
P1.0
26-Jan-10
|
|
|
229 |
#42256: This is a suggestion for the next edition: I was very disappointed on page 229 to read paragraph "Since the mechanics of navigation...". I understand you don't need to cover all the details again, but having at least some big picture view of what the reader needs to do to go from the point at the beginning of the page to where they can successfully follow along starting at the bottom of the page would be really great. At the current moment, I'm completely stuck, because I don't know what pieces I'm missing, nor do I know whether I should be creating the views using IB or via code... etc. Lots of question in my mind. A couple of images and list of steps, taking up a page or less would give me everything I need to succeed with this chapter. As it stands now, I feel like a failure because I'm not going to be able to follow along for the rest of the chapter :(--Elisabeth Robson #42256: This is a suggestion for the next edition: I was very disappointed on page 229 to read paragraph "Since the mechanics of navigation...". I u ...more...
|
P2.0
04-Feb-10
|
|
| 236 |
|
#42014: There seems to be a memory leak under the "NSFetchedResultsChangeInsert" clause in -(void)controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:
The line
[self.tableView insertSections:[[NSIndexSet alloc] initWithIndex:0] withRowAnimation:UITableViewRowAnimationRight];
should instead read
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationRight];
The corrected version will give back an autoreleased NSIndexSet. The first will leak the alloc'd NSIndexSet.--Ryan McCuaig #42014: There seems to be a memory leak under the "NSFetchedResultsChangeInsert" clause in -(void)controller:didChangeObject:atIndexPath:forChangeType ...more...
|
P1.0
05-Jan-10
|
|
| 306 |
|
#42214: MPMoviePlayerController's MPMoviePlayerContentPreloadDidFinishNotification is deprecated in favor of the loadState property.--Florian Maunier
|
P2.0
29-Jan-10
|
|
|
377 |
#42016: The example application "Draw" seems to be missing the code to actually draw the dots.--Michael Nygard
|
P1.0
06-Jan-10
|
|
| 460 |
|
#42048: "its" should be "it's":
"if we have a valid location, and its within 20 meters then stop"--Anh Quang Do
|
P1.0
10-Jan-10
|
|
| 462 |
|
#42213: CLLocation's getDIstanceFrom: is deprecated in favor of CLLocation's distanceFromLocation: in iPhone OS 3.2--Florian Maunier
|
P2.0
29-Jan-10
|
|