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 P1.0,
released 6 months 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 |
#49940: Second paragraph, it says that the class name that contains the "SLServiceTwitter" constant is "SLServiceRequest", but the class name shown in the actual iOS 6.0 documentation is called "SLRequest". The next paragraph correctly states the name of the class as "SLRequest".--Enrique Delgado #49940: Second paragraph, it says that the class name that contains the "SLServiceTwitter" constant is "SLServiceRequest", but the class name shown in ...more...
|
B7.0
11-Oct-12
|
|
| 25 |
|
#50303: In the 4'th item for thought, second sentence, there is a space missing between "perhaps" and "handleFacebookButtonTapped:".--Kim Shrier
|
P1.0
06-Dec-12
|
|
| 28 |
|
#50333: "By default, protocol methods are optional, but they can be made mandatory" should state the opposite:
"By default, protocol methods are mandatory, but they can be made optional"--Guido Soranzio #50333: "By default, protocol methods are optional, but they can be made mandatory" should state the opposite:
"By default, protocol methods are ma ...more...
|
P1.0
08-Dec-12
|
|
| 31 |
|
#50134: if the object isnil, nothing
-> is_space_nil_--Christoph Gommel
|
B8.0
04-Nov-12
|
|
| 32 |
|
#49956: The square braces indicate that we're sending an Obj-C message, with the SLComposeViewController class as the target that receives the message and canSendTweet as the selector that defines the message.
Wrong: canSendTweet
Correct: isAvailableForServiceType--Marco Antonio Rojo Marcondes #49956: The square braces indicate that we're sending an Obj-C message, with the SLComposeViewController class as the target that receives the message ...more...
|
B7.0
18-Oct-12
|
|
| 35 |
35 |
#50173: The text says there's a string "yourtwittername" in the shown URL, but there's no such string, the example URL is "twitter.com/pragprog", not "twitter.com/yourtwittername"--Stefan Jourdan #50173: The text says there's a string "yourtwittername" in the shown URL, but there's no such string, the example URL is "twitter.com/pragprog", not ...more...
|
P1.0
16-Nov-12
|
|
| 46 |
|
#50306: In the third paragraph, second sentence, there should be a space between "x-y" and "origin".--Kim Shrier
|
P1.0
07-Dec-12
|
|
| 60 |
|
#50181: In the code block, dismissing the tweet view controller (Line #11) is dependent on the user clicking 'Send'. When clicking 'Cancel', the view controller isn't dismissed.
Moving the dismiss code out of the 'if' statement will dismiss the view controller in either case – as in:
[self dismissViewControllerAnimated:YES completion:NULL];
if (SLComposeViewControllerResultDone == result) {
[self reloadTweets];
}
--Per Salomonsen #50181: In the code block, dismissing the tweet view controller (Line #11) is dependent on the user clicking 'Send'. When clicking 'Cancel', the view ...more...
|
P1.0
19-Nov-12
|
|
| 64 |
|
#50307: At the end of the second paragraph, you mention that the full class extension for PRPViewController contains the twitterWebView property when it should say that it contains the twitterTextView property.--Kim Shrier #50307: At the end of the second paragraph, you mention that the full class extension for PRPViewController contains the twitterWebView property when ...more...
|
P1.0
07-Dec-12
|
|
| 64 |
49 |
#50373: "To get the NSString to behave as a normal, immutable
string, we copy it into a plain NSString at assign-time." -- should be
"To get the NSMutableString to behave as a normal, immutable
string, we copy it into a plain NSString at assign-time."--Sairam Mattancheril #50373: "To get the NSString to behave as a normal, immutable
string, we copy it into a plain NSString at assign-time." -- should be
"To get the N ...more...
|
P1.0
13-Dec-12
|
|
| 66 |
|
#50183: The implementation of handleTwitterData:urlResponse:error: doesn't clear the contents of twitterTextView before generating it anew. If the "Show my tweets" button is pressed before tweeting, the new tweet won't be displayed at the top, but rather in the middle.--Per Salomonsen #50183: The implementation of handleTwitterData:urlResponse:error: doesn't clear the contents of twitterTextView before generating it anew. If the "S ...more...
|
P1.0
19-Nov-12
|
|
| 73 |
|
#49958: Noticed on the Readmill version of the book, in the code listing for Programming/PRPFirstProjectTweeter02/PRPFirstProjectTweeter/PRPViewController.m, in the handleShowMyTweetsTapped method, the url listed is "www.twitter.com/pragprog", but on the next page it says "obviously, the yourtwittername in the URL string should be replaced by an actual Twitter handle." "yourtwittername" doesn't actually appear in the code listing.--Hollis Marek #49958: Noticed on the Readmill version of the book, in the code listing for Programming/PRPFirstProjectTweeter02/PRPFirstProjectTweeter/PRPViewContro ...more...
|
B8.0
18-Oct-12
|
|
| 80 |
|
#49933: The second sentence of the first paragraph in section "3.3 Concurrency and UIKit" ends with "call them" (referring to UIKit properties). Wouldn't it be more accurate to say "reference them" instead?--Bruce Hobbs #49933: The second sentence of the first paragraph in section "3.3 Concurrency and UIKit" ends with "call them" (referring to UIKit properties). Would ...more...
|
B7.0
07-Oct-12
|
|
| 82 |
|
#49932: The penultimate word in the last sentence of the first paragraph should be twitterTextView not twitterWebView.--Bruce Hobbs
|
B7.0
07-Oct-12
|
|
| 84 |
|
#50260: Potential gotcha: the order matters here. If you aren't paying attention and put line 9 in the wrong place (like I did), say, at line 5 ahead of the creation of the viewController, the app will launch but the title will be blank. Worse, though, is that the failure is silent; it won't perform as expected, but it's hard to figure out why. I had to use a series of NSLog statements tracing the setting of recipeTitle, etc. to see why the values that were being passed around were (null).--Steven #50260: Potential gotcha: the order matters here. If you aren't paying attention and put line 9 in the wrong place (like I did), say, at line 5 ahea ...more...
|
P1.0
04-Dec-12
|
|
| 87 |
|
#50065: In 4.1 Practicing MVC.
I think you need to add:
#import "PRPRecipe.h"
at the top of PRPViewController.h so the property can resolve the reference to PRPRecipe--Armando Flores #50065: In 4.1 Practicing MVC.
I think you need to add:
#import "PRPRecipe.h"
at the top of PRPViewController.h so the property can resolve the ref ...more...
|
B8.0
27-Oct-12
|
|
| 88 |
|
#50217: Minor typo: page 88 in ePub first line the URL in the code is "pragprog" twitter handle but text refers "yourtwittername".
--Dad
|
P1.0
29-Nov-12
|
|
| 89 |
|
#50310: Below figure 36, probably after you talk about sizing the image view for the cookies, you might want to talk about updating the view constraints to accommodate the two iPhone sizes.--Kim Shrier #50310: Below figure 36, probably after you talk about sizing the image view for the cookies, you might want to talk about updating the view constrain ...more...
|
P1.0
07-Dec-12
|
|
| 97 |
|
#49957: There is a reference to an image on page 98, but there is no image on page 98, just the image subscript. --Alex crouzen
|
B8.0
18-Oct-12
|
|
| 98 |
|
#50740: I have no idea what is meant by "Import the PRPRecipe.h filename and..." in the middle of the page. Assuming we continue from chapter 4, I already have a PRPRecipe.h file. What's more the very next code sample refers to the code in PRPAppDelegate.m. But then on the next page, there's only 7 lines for this code file, and it doesn't include the samples from the previous page. I'm a bit lost!--homercycles #50740: I have no idea what is meant by "Import the PRPRecipe.h filename and..." in the middle of the page. Assuming we continue from chapter 4, I alr ...more...
|
P1.0
06-Feb-13
|
|
| 98 |
|
#50312: In the second paragraph, first sentence the hyphenation for PRPAppDelegate.m looks odd. I would think the hyphen should be between PRP and AppDelegate.m or between PRPApp and Delegate.m.--Kim Shrier #50312: In the second paragraph, first sentence the hyphenation for PRPAppDelegate.m looks odd. I would think the hyphen should be between PRP and Ap ...more...
|
P1.0
07-Dec-12
|
|
| 106 |
|
#50284: Text refers to IMG_1948.jpg and code refers to cookie.jpg. Also, it may be helpful to show how to import the image into the project.--Foster Bass
|
P1.0
05-Dec-12
|
|
| 139 |
|
#50175: On line 5 in the first text block there is a space missing at the end of the line between title and property--Magnus Rembold
|
P1.0
17-Nov-12
|
|
| 141 |
|
#50177: In the second last block of text on this page, you mention, that the view will be in a navigation controller. So I would expect to find the pattern of "creating another navigation view controller as a wrapper" to be repeated as it was in the creation of the recipe editor view. Why is there no additional navigation view controller wrapped around the directions view controller this time?
I think, a short explanation about that would help people from accidentally wrapping in another navigation controller or expecting to find that direction somewhere later in the text.--Magnus Rembold #50177: In the second last block of text on this page, you mention, that the view will be in a navigation controller. So I would expect to find the pa ...more...
|
P1.0
17-Nov-12
|
|
| 142 |
|
#50176: In line 4 in the first text block I think it should read: "that THE textViewDidEndEditing: method is called before the recipe editor IS displayed."--Magnus Rembold
|
P1.0
17-Nov-12
|
|
| 151 |
|
#50224: When the property recipeListVC is added to the headerfile PRPRecipeEditorViewController.h the next sentence says:
In the implementation file, we need to import PRPRecipesListViewController.h.
Don't you mean the header file?
regards
Claus--Claus Guttesen #50224: When the property recipeListVC is added to the headerfile PRPRecipeEditorViewController.h the next sentence says:
In the implementation fil ...more...
|
P1.0
02-Dec-12
|
|
| 156 |
|
#50326: In the last paragraph, first sentence, there should be a space between "super" and "init".--Kim Shrier
|
P1.0
07-Dec-12
|
|
| 158 |
|
#50203: When adding the 'recipes' property to the new PRPRecipeDocument class, the book fails to note that the property getter should be copied from PRPRecipesSource (or implemented) in order to create the 'recipes' array lazily. Failing to implement that property getter will result in the following error when updating the table view: 'attempt to insert row 0 into section 0, but there are only 0 rows in section 0 after the update.'--Per Salomonsen #50203: When adding the 'recipes' property to the new PRPRecipeDocument class, the book fails to note that the property getter should be copied from P ...more...
|
P1.0
24-Nov-12
|
|
| 159 |
|
#49986: Figure 62 appears to be missing--David Yellin
|
B8.0
23-Oct-12
|
|
| 160 |
|
#50204: In the second paragraph it says: "We need to ensure that we have an array ready in which to store recipes when the document is created, so let's override the initWithFileURL: method." However, it isn't immediately obvious how the code sample accomplishes this.
It looks like the code sample tests for the existence of a document file on disk and, if not present, saves the document to disk. The side-effect of this is that the reference to the 'recipes' property in contentsForType:error: will create that array.
I would suggest a more in-depth explanation of what happens in that method (for a newbie like me, it looks a lot like black magic), as it's done so excellent in most other code samples. For instance, how does the array get initialized if the file actually exists? Is loading the document content from the file implicit in the call to [super initWithFileURL:url]?--Per Salomonsen #50204: In the second paragraph it says: "We need to ensure that we have an array ready in which to store recipes when the document is created, so let ...more...
|
P1.0
24-Nov-12
|
|
| 162 |
|
#50205: In the section "Refine the Document" it says: "If you delete the app from the simulator and then rerun it from Xcode, you'll notice that our document fails to open."
This is no longer true, because of the initWithFileURL: method inserted on page 160, which proactively creates the document on disk, if it doesn't exist when the document is initialized.
The handleError:userInteractionPermitted: method is not called with an NSFileReadNoSuchFileError, even when deleting the application (and it's document) from the simulator before running the application.--Per Salomonsen #50205: In the section "Refine the Document" it says: "If you delete the app from the simulator and then rerun it from Xcode, you'll notice that our d ...more...
|
P1.0
24-Nov-12
|
|
| 163 |
|
#49908: Xcode 4.5: Starting with the "DocumentRecipies_start" code and then working through page 170, up to Refine the Document: If you run the code from the DocumentRecipies_start folder, the app will crash when attempting to insert a new recipe into the recipes list. If you rename the folder to "DocumentRecipies" it will behave correctly. I tried replacing all of my files with the DocumentRecipies_01 files and it still crashed if the main folder is titled "DocumentRecipies_start".
--J. Lincoln Barr #49908: Xcode 4.5: Starting with the "DocumentRecipies_start" code and then working through page 170, up to Refine the Document: If you run the code f ...more...
|
B7.0
02-Oct-12
|
|
| 172 |
160 |
#50259: PRPRecipesDocument.m is missing "recipes" property initialization for those following along writing their own code. The book says on page 160, paragraph 2, "We need to ensure that we have an array ready in which to store recipes when the document is created, so let’s override the initWithFileURL: method." However, the initWithFileURL method doesn't create the array which causes an error when trying to save a new recipe in the simulator.
Perhaps the sample code for PRPRecipesDocument.m should include a line to initialize the recipes property, e.g. "self.recipes = [NSMutableArray array]" in the 'if (self) {}" block.--Alfred Lau #50259: PRPRecipesDocument.m is missing "recipes" property initialization for those following along writing their own code. The book says on page 160, ...more...
|
P1.0
04-Dec-12
|
|
| 178 |
|
#49925: In the middle of the page: "Tap the Add button on the bottom right..." should be "Tap the Add button on the bottom left..." It is located there in Xcode 4.5.1. The same statement appears on following pages.--J. Lincoln Barr #49925: In the middle of the page: "Tap the Add button on the bottom right..." should be "Tap the Add button on the bottom left..." It is located ther ...more...
|
B7.0
05-Oct-12
|
|
| 225 |
|
#50616: My test script kept failing at the step where it was supposed to click the prep time stepper. With the keyboard on the screen, it couldn't find the Increment button to push it.
By adding this line right below the line that set the recipe title, I was able to dismiss the keyboard and have the script finish successfully:
target.frontMostApp().keyboard().elements()["Return"].tap();
Perhaps this should be added in to the book's code?--Ron Toland #50616: My test script kept failing at the step where it was supposed to click the prep time stepper. With the keyboard on the screen, it couldn't fin ...more...
|
P1.0
29-Jan-13
|
|
| 2002 |
gfsoD |
#50115: I will be putting this dazzling isnihgt to good use in no time.--rjzclwHAafvqEucmrz
|
B8.0
01-Nov-12
|
|