By Developers, For Developers

Historical errata for iPhone SDK Development

PDF PgPaper PgTypeDescriptionFixed onComments
9TYPO

I noticed a run-on sentence on page 9 in the Terminology callout box

from Jamie Phelps, Thx again!

2008-10-03
24TYPO

In the text you call the new action “buttonPushed:” but in the referencing image Figure 2.2 the action is called “buttonClicked:”

From Brian Beers, Thx!

2008-10-03
11TYPO

Change “create” to “created” in following sentence in first paragraph: “There are several other files create for us but we will look at many of them later….”

2008-10-03
3434ERROR

2.6 Configuring the View Controller

You forgot to say to connect the EditorVC to the file’s owner’s eVC outlet in IB

Cheers

2008-10-03
3131ERROR

2.5 Configuring the Text Field

you forgot to mention to @synthesize the *field prop in the implementation

Cheers

2008-10-03
37TYPO

First full paragraph near the top.
“Each row of a contains …”
Should be “Each row of a table contains …”

2008-10-03
37TYPO

Paragraph 1 of 3.2 … ‘To conform with the Modal-View-Controller …’.

Modal should be Model.

2008-10-03
12TYPO

First of multiple occurrences of Xcode being called XCode. A bit petty but I guess that’s a privilege of being a beta reader! ;)

2008-10-03
42TYPO

[…]just be the name of the cell’s class. In our case, since we’re not sub-
classing UITableViewCel, but[…]

It should be UITableViewCell

2008-10-03
38TYPO

[…] sometimes you’ll want to group the list into discrete sections. A
row therefore in a UITableView is alway contained within […]

I think you meant always ;)

2008-10-03
42TYPO

Paragraph 1, Line 1 : “Each row in a given section of a table view usually represented by …”

Should be: “Each row in a given section of a table view is usually represented by …”

2008-10-03
42TYPO

Paragraph 2, Line 1 : “So say in this application we are eventually are listing teams …”

Should be: “So say in this application we are eventually listing teams …”

2008-10-03
12TYPO

The book uses “XCode” in a number of places. The name is “Xcode” with only a capital “X” just like any other common name.

2008-10-03
28TYPO

In the code snipped (StarterViewController.h) printed in the book, the line

@class EditorViewController;

is missing. The line is included in the download-code.

2008-10-03
33ERROR

StarterViewController.h needs to #import “EditorViewController.h” or the build will fail.

2008-10-03
24TYPO

The event is defined as buttonPushed: but then buttonClicked: is used on the following page

2008-10-03
37TYPO

Paragraph 1 of 3.2 …“It defines methods that tell a table view know how to draw itself” should be “It defines methods that tell a table view how to draw itself”

2008-10-03
60TYPO

On the left of that status bar you’ll see the number of cell bars available,
the name of your carrier, and an indication of whether you are using
edge, G3, or WiFi.

G3 should be 3G instead

2008-10-03
47/48TYPO

In the code listing at the bottom of the page which carries over to page 48, you have included the line to remove the item from the teams array even though it is meant to be the boiler-plate code.

2008-12-02
41OK

the array is not retained after allocation with arrayWithObjects. Better should be

self.teams = [[NSMutableArray arrayWithObjects: …] retain];

2008-10-03
41OK

please remove my erratum for this page; I didn’t see the property assignment

2008-10-03
125TYPO

Implementing the Browser
1st paragraph, last sentence:
… or when they hit “Return” no the pop-up keyboard.

should read
… or when they hit “Return” on the pop-up keyboard.

Cheers

2008-10-03
126OK

Figure 9.2 “Rendering a web site with UIWebView”

is displayed right in the middle of a code sample, breaking it in two.

The sampple starts on page 125 and should be :

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField == urlField) {
[textField resignFirstResponder];
[self loadURL];
}
return YES;
}

Cheers,
Florian

2008-10-03
132OK

Page 132, the ‘Joe asks’ section breaks a code sample in two.
Code starts page 131 and ends page 133.

Cheers,
Florian

2008-10-03
137OK

The code sample at the bottom of page 137 has line numbers in it, whereas the other ones don’t.

Cheers,
The nitpicker.

2008-10-03
166OK

Second to last paragraph :

You can set the delgate for your animations

should read

You can set the delegate for your animations

Cheers,
The nitpicker.

2008-10-03
33SUGGEST

I think you should explain in more detail how to connect the field’s delegate to the File’s owner. On first reading, I thought that implementing the two methods was connecting the delegate.

2008-10-08
53TYPO

In the first full paragraph you tell the reader to set the File Owner’s navigationitem to reference the UINavigationItem. You cannot do this until you have done step 3.12 on page 54.

2008-12-02
41SUGGEST

“Right between where we synthesized the teams instance variable and where the viewDidLoad method is…” In the code generated by the SDK (build 9M2517), there are already several methods between these two points.

2008-12-02
45SUGGEST

“Our text view’s rows didn’t expand to fill the space provided…” This issue doesn’t appear with the SDK Build 9M2517, so the section is no longer relevant.

2008-11-21
56ERROR

RootViewController.m should #import “AddTeamViewController.h”

2008-11-21
29TYPO

In the first paragraph of section 2.4, “New->File” should be “Add->New File”.

2008-10-03
48ERROR

> [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];

“YES” must be “UITableViewRowAnimationFade” or something.

2008-11-21
24ERROR

“This tells Inter face Builder that the ButtonViewController has a method called buttonPushed:.”

This should be buttonClicked instead of buttonPushed to go with the screenshots.

2008-10-03
33TYPO

“when the text filed is done editing” should read “when the text field is done editing”

2008-10-03
20SUGGEST

I found figure 1.9 (and accompanying explanation) for running your app on your iPhone to be a bit nebulous. While trying to follow your directions (and correlating THAT to what the Provisioning ‘How To’ on the iPhone Developer Program Portal was telling me) I kept getting an error in the installation of the Hello.app onto my phone. Having never set up a developer certificate before, I found it to be an interesting process. In the end, following the Provisioning ‘How To’>Building and Installing your Development Application… led me to use the ‘Build’ Tab on the ‘Info’ dialog of the Target Hello.app whereupon the app installed and ran properly.

2008-11-21
47ERROR

actually the whole viewDidLoad method is commented so the enclosing /* and */ must also be deleted in addition to uncommenting the line inside the method.

2008-12-02
23TYPO

The sentence that reads “Finally,you’ll move to Xcode to create …” needs a space after the comma.

2008-11-21
29SUGGEST

In the last paragraph, after the line “Now we need to setup the File’s Owner to be the EditorViewController class.”, I would add “Select the File’s Owner object, open the identity inspector…”. If the object is not selected, or if a different object is selected, typing “Ed” in the Identity inspectors class field will not autocomplete and would be wrong.

2008-10-08
41TYPO

“let’s walk through each code” should read “let’s walk through each line of code”

2008-11-21
29OK

In section 2.3, at no point do you mention that the StarterViewController File’s Owners view should be connected to the View object. Failing to do this results in an error: ‘-[UIViewController loadView] loaded the “StarterViewController” nib but no view was set.’

2008-10-08
14ERROR

This is really nitpicky…

You say “Your first run will be a simple white background (a great flashlight
app).”

When actually the default is a grey background. But I did enjoy the flashlight joke. :-)

2008-10-28
14SUGGEST

In the second paragraph you tell the reader to open the HelloViewController.xib file. You then go on to refer to it as a nib file. For people completely new to IB, you might want to include a footnote or other explanatory text that talks about how a xib file is an XML equivalent of a nib file which is easier for version control systems to deal with. Also explain that the term “nib” originally refered to “NeXT Interface Builder” files and that the MAC OSX IB is derived the NeXT one. And if you really want to be long winded, explain that when the project is built, the xib files are used to generate nib files that are stored in the app bundle.

Just a suggestion.

2008-11-21
16SUGGEST

In the last sentence on the previous page you say:

“The next step is to get our application to respond to the rotation of the device.”

Then in the first sentence of section 1.4 (which is the next one that a user would read) you say:

“Recall that we want the text to rotate when the device is rotated.”

Is our memory really that bad? :-)

2008-11-21
19TYPO

In the first paragraph of section 1.5, 5th sentence, toward the end, you have “… with you iPhone developer certificates.” The word “you” should be “your”.

2008-11-21
20SUGGEST

You assume that users have already signed up and gone through the (multi-hour) process of getting dev certificates, provisioning profiles, etc all setup when you say:

“however the identifier has to match one of the provisioning profiles you set up with you iPhone developer certificates”

IMHO this app store/development setup process should be given an overview, or at least explain what all the pieces do. I think a number of developers who have not worked with digital certs before may encounter a great deal of uncertainty in this process that is poorly documented by apple.

In any case, you should not assume the developer has gone through this process. Is it really required for getting through all the examples in the book? What if I want to read and test the waters without investing in the $99? Just a thought…

2008-11-21
24SUGGEST

You state “Your inspector should look like Figure 2.2, on page 26.”

A few times now you have placed screenshots 2+ pages from the relevant content. Is it not possible to get the screenshots inline (wrapped) with the text?

2008-11-21
27TYPO

No period at end of sentence:

…requires more than one view controller

2008-10-24
27TYPO

“I promise the bumpy feeling won’t last
long soon you will build your intuition and all this jumping back and
forth will make sense (and you’ll even come to like the fluid nature of it,
promise).”

perhaps should be:

“I promise the bumpy feeling won’t last long and soon all of this jumping back and forth will become almost intuitive (and I promise you’ll even come to enjoy the fluid nature of it).”

At the very least you need an ‘and’ before the ‘soon’, which is currently missing.

2008-10-24
27TYPO

“In this we are going to build another simple application that has two
view controllers.”

should be:

“In this next example we are going to build another simple application that has two view controllers.”

2008-10-08
28TYPO

“two fold” should be “twofold”. See dictionary dot com

2008-10-08
28SUGGEST

This errata application silently drops any submissions that have a URL link in them… I added a link to a dictionary app to substantiate my errata report for page 28. I never appeared and I had to submit again, guessing that the link was the issue. Can you please alert the submitter if there is prohibited content?

2008-10-08
28TYPO

“first hand” should be “firsthand”

2008-10-08
30SUGGEST

“So if you don’t already have Xcode fired up do
that now, then open the Starter.xcodeproj and then”

This is unlikely as you just had us create the project a few paragraphs earlier. I would remove this bit…

2008-10-08
30SUGGEST

“Save your work in Xcode and go back to Inter face Builder and you’ll see the action and the two outlets that you just added.”

Actually, you will only see this when you go back to IB if you also first select the ‘File’s Owner’ object.

2008-10-08
30SUGGEST

“Back in Interface Builder, Control click on the button and drag to the
File’s Owner object in the document window.”

Umm, you just told us to go back to IB in the previous sentence.

2008-10-08
33TYPO

" The ’Return’ key is set to ’Done’ so the user knows
that when she is finished typing she can hit to say she is done."

Perhaps should be:

“The ’Return’ key is set to ’Done’ so the user knows that when she is finished typing she can simply touch it to finish.”

2008-10-08
32ERROR

Major confusion point in the text in section 2.4 Configuring the Text Field. You discuss (for more than a page) how to set the text field attributes correctly, but nowhere in sections 2.2. or 2.3 have we put a text field in the view. You instead instructed us to insert a UILabel. It took me a few minutes of wondering why I could not see the inspector attributes for a textfield when looking at the label attributes. Perhaps this section needs to go after we create the modal dialog for entering text?

2008-10-08
36TYPO

In the objective-c properties sidebar:

‘through’ should be ‘thorough’

2008-10-08
39TYPO

Huh?

“This is because the only the the compiler”

2008-10-08
39SUGGEST

This section really needs clarification:

“Select the new view controller and open the Attributes inspector (Command-
1). Set the nib file name to Editor and then set the class name to Edi-
torViewController in the Identity inspector. And the final step, connect
the editorViewController outlet to this new view controller. Control click
on the files owner and drag to the new view controller. When you release
choose editorViewController make the connection.”

Especially the connections from file’s owner. I was scratching my head for a couple of minutes trying to figure out what it was you were trying to get us to do.

2008-10-24
#24TYPO

In the description, “In the list of actions click the ’+’ button and call the action buttonPushed: (make sure to keep the colon).”

While in fact the action you are creating is called buttonClicked, and the diagrams show that also.

2008-12-16
64TYPO

“That was a bit of work but we’re done with everyone we have to do to
add a new team to the list.”

Should be ‘everything’ I suppose.

2008-12-03
36TYPO

“It is typical to retur n YES from this method but if you
wanted to do some validation and keep the text field from resigning first
responder status you can NO.” should read “…you can return NO.”

2008-10-08
51SUGGEST

The version of Xcode I am using 3.1.1 with iPhone 2.1 has the tableview setup to auto-expand without the need to make these changes.

2008-12-03
2424TYPO

In the last paragraph of section 2.1 “Your First View Controller” the first line says:

“Now we need to tell IB about our intent with the view controller SO CAN connect the button to the view controller”

I believe its missing an “it”. It should say:

“Now we need to tell IB about our intent with the view controller so it can connect the button to the view controller”

2008-11-21
58ERROR

The action of adding navigation item is not correct, your description:

Our AddTeamViewController views needs a title and a button to get back
to the list of teams. Search for “Navigation Item” in the Inter face Builder
library. Drag an instance into our AddTeamViewController Inspector win-
dow. Control click the File’s Owner to the “Navigation Item” and assign
it to the File’s Owner’s navigationItem outlet. Then set the title of the
Navigation Item to “Add Team” in the attribute inspector.

But you don’t jet assign file’s owner to AddTeamViewController, so it can’t have outlet.

2009-01-17
25ERROR

In Section 2.1, when we add the “buttonClicked” action to our View Controller, in the book you say that we should go back to Xcode and write the following method declaration:

- (void)buttonClicked:(id)sender;

That, I believe, is incorrect. Since its linked to a user interface element it should be an IBAction and not void, as follows:

- (IBAction)buttonClicked:(id)sender;

Cheers.

2008-10-24
16TYPO

“turn on spring’s for both directions” - should be “springs”.

(Incidentally, when copying/pasting the text from Preview, there was a space between the ‘r’ and ‘n’ in “turn”. Might reflect a bug in formatting.)

2008-11-21
16TYPO

“resized or when it’s super view is resized” (its)

2008-11-21
16TYPO

“unwritten chp.views for now though”

Needs semi-colon after “chp.views”

2008-11-21
17SUGGEST

“We are now finished with updating the UI.” This should be the start of a new paragraph; it doesn’t really belong with the previous sentences. Better yet, drop it and the next sentence entirely.

(Also another “it’s” on that page)

2008-11-21
19SUGGEST

“If its easier to find what you are looking for you can
hold down the alt key”

Suggest specifying it as the “option” key instead, since that’s how most Mac users think of the key.

2008-11-21
28TYPO

In the last paragraph of this page there is a parenthesis that reads:

“(I warned you it would be be a bit bumpy)”.

There only needs to be one “be”.

2008-10-08
20TYPO

“Build & and Go”
“with you iPhone”

2008-11-21
20TYPO

“Here is the code this application.”

2008-11-21
25SUGGEST

“In Xcode open the ButtonViewController.h file and add a declara-
tion for the buttonClicked: method.”
You should add information where to put the declaration (after interface ... {} and before end).

2008-10-24
27TYPO

Missing period after first sentence in the “2.2 Multiple View Controllers” section.

2008-10-24
32TYPO

2.4 Configuring the Text Field - WHAT text field? We were never told to put one on. This whole chapter seems like it was written by someone else and it’s much harder to follow.

2008-10-08
35TYPO

In the first Paragraph is says " and choose New -> File from “, it should be ” and choose Add -> New File … from ".

2008-10-08
35SUGGEST

In the last paragraph when opening the Identity Inspector you need to have the File’s Owner Object selected. By default this is not selected so you may want to state it here since this is still probably a new concept to people.

2008-10-08
35TYPO

The last sentence on this page says “Control click on File’s Owner and drag to the View object connect the view outlet (view is inherited from UIViewController and must be connected).”
This reads funny to me. I suggest “Control click on File’s Owner and drag it to the View object to connect to the view outlet (view is inherited from UIViewController and must be connected).”

2008-11-21
39SUGGEST

In the second paragraph it says “To fix that add an import near the top of the file for the EditorViewController.h header.” It’s not clear what file needs to be edited. I suggest saying “To fix that add an import near the top of the StarterViewController.m file for the EditorViewController.h header.”

2008-10-08
61ERROR

needed an #import “AddteamViewController.h” in RootViewController.m

2009-01-15
46TYPO

The fourth paragraph says “Before we do, let’s walk through each code to understand what it’s doing.”
I believe this should be “Before we do, let’s walk through each line of code to understand what it’s doing.”

2008-11-21
47SUGGEST

Paragraph one ends with “being used for performance.” I think this should be “being reused for performance.”

2008-11-21
47TYPO

The second sentence of paragraph 2 says “Each cell has an image of the team’s logo on the left and the teams name as the text in the middle.” The second “teams” is missing an apostrophe. So it should be like this “Each cell has an image of the team’s logo on the left and the team’s name as the text in the middle.”

2008-11-21
49ERROR

The last paragraph says “…in RootViewController.
The default implemtentation returns YES…”. This is not true. Here is the default implementation from my project:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

2009-01-16
52ERROR

The viewDidLoad method in my project does not look like what is shown. Here is what I saw:
/*
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to add the Edit button to the navigation bar.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
*/

2008-12-03
56ERROR

In the second to last paragraph when creating the new view you need to make sure Cocoa Touch is selected in the nav on the left of the Choose a Template Wizard. If you have Cocoa selected there is a view option as well.

2008-12-03
39SUGGEST

Ok, this chapter is just a mess guys. The first chapter was very well done but here in chapter 2 it’s all confusing and I don’t feel like I have a grasp of why we did what we did to make the example work. I feel like I was able to build the Starter application only because I followed the steps (even with all the errors) and not because I was understanding the concepts. This chapter needs a lot of work.

2008-10-08
117ERROR

In 8.2 it says to add the lib-sqlite3.dylib it’s already added for the sample code.

2008-11-13
49TYPO

I don’t think “niggly” is a real word, is it? (line 3)

2009-01-16
46SUGGEST

“Right between where we synthesized the teams instance variable and
where the viewDidLoad method is, add this initialization code:”

This instruction does not truly fit with reality (at least for the latest versions of XCode. Between the teams instance variable and the viewDidLoad method are several pre-generated methods. And viewDidLoad is also commented out. In my generated code it would be more accurate to say:

“Right between where we synthesized the teams instance variable and
where the numberOfSectionsInTableView method is, add this initialization code:”

In general though, I think you would be better served in this case, as well as throughout the book to actually provide a few lines of context around any code that you are providing. This will eliminate confusion, and will require less reader parsing of text when the code sample is self documenting as to the change. You may even highlight the new code in a bold font and the context code in a lighter color.

2008-12-02
71ERROR

Before starting in with Section 4.7 you also need to add:
#import “PlayersTableViewController.h”
to the top of RootViewController.m

2009-06-16
46TYPO

“Before we do, let’s walk through each code to understand what it’s doing.”

I suspect you meant ‘each line of code’. Or perhaps ‘each part of the code’?

2008-11-21
53TYPO

[teams removeObjectAtIndex:indexPath.row] gives me a warning: “NSMutableArray” may not respond to “-removeObjectAtIndex:” (Messages without a matching method signature will be assumed to return ‘id’ and accept ‘…’ as arguments".

And when I run the app and try to delete the row, it freezes once I press the red “Delete” button on the row I want to delete.

2008-12-03
78SUGGEST

The end of the second paragraph of the Using a ready-made button section says “… list of basketball teams in the (as yet) unwritten sec.deletingRows.” That section exists now so you may want to update this.

2009-01-15
50ERROR

It would appear with SDK 2.1, the default for the table view in the Navigation template is to expand with the view, so these steps are no longer necessary.

2008-12-03
62SUGGEST

It might be helpful here to mention that setting the delegate and the return button for the keyboard can be done in IB.

2009-01-15
71SUGGEST

Move figure 4.2 after the start of section 4.7. It seems out of place at the end of section 4.6.

2009-01-15
19OK

After clicking on “Download HelloiPhone/Hello/Classes/HelloViewController.m”, the browser doesn’t show the file contents properly, as though the web server doesn’t know how to display the file as code or whatever.

2008-12-16
31ERROR

Header file for StartViewController.h should include

#import “EditorViewController.h”

.Otherwise, you will get 6 build errors, because the editorViewController constant cannot be referenced.

2008-10-08
92TYPO

I’m quite new to Cocoa but one of the first thing I learned was that if you did an alloc you have to do a release. In the method loadFileContentsIntoTextView you are doing an alloc both on inputStream and readBufferString without a release.

2008-11-13
40SUGGEST

Be nice to download a .dmg file that has the entire project in it, so we could compile it and run it - and maybe compare to our own (that isn’t working).

2008-10-08
52SUGGEST

3rd line in paragraph for section 3.9, “edit mode and then make the UITableViewdataSourcerableView:commitEditingStyle:forRowAtIndexPath:” should be wrapping in there somewhere - it extends past the margin of the text column.

2009-01-16
174ERROR

Typo/Error on the call of the animation values.
animation.values = [NSArray arrayWithObjects:initial,
intermediate, final, nil];

should be changed in all code (example in book and supplement):
animation.values = [NSArray arrayWithObjects:initial,
middle, final, nil];

All considering that you just gave a NSValue to *middle in the page prior.

2008-10-24
58TYPO

In Xcode select FileNew File… (or Command N ). When propmted choose
a UIViewController subclass that we’re going to call AddTeamViewCon-
troller.

Note “propmted” should be “prompted”.

2008-12-03
58SUGGEST

Include the code for dealloc method, as well as the synthesize (boring, but helpful). Do the same thing on page 61 too (include the code).

2008-12-03
60SUGGEST

Make Figure 3.13 description be “Figure 3.13: Confirming outlets are set correctly (Right Click on File’s Owner)”

2009-01-16
68ERROR

If the title property set in the code sample at the top of the page is defined as the rest of the properties discussed so far: property (nonatomic, retain) NSString *title;
then this sample will leak. Either an assign property, autoreleasing the string or explaining that memory management is ignored here would fix that.

2008-12-16
128SUGGEST

Re: being “welcome to try” to compete with Safari - given the apparent stance of Apple on this, this may not be that appropriate to suggest.

2008-11-13
46ERROR

Yor write:
Right between where we synthesized the teams instance variable and
where the viewDidLoad method is, add this initialization code:

But in XCode, viewDidLoad is long way down in the code. So just change it to read:
Right after where we synthesized the variable…

2008-12-02
51SUGGEST

Re: #34812
Same here. Default is bound to all 4 edges. 3.1 + 2.1

2008-12-03
52ERROR

Default in XCode 3.1 / iPhone 2.1 is
self.navigationItem.rightBarButtonItem = self.editButtonItem;
Edit in the left is old style. Also, now many default functions in the template code is commented out with block comments /* … */

2008-12-03
115TYPO

Like most databases, works with SQL, Structured Query Language,
a widely-supported standard for expressing database commands as
human-readable, dynamically-composable command strings.

Seems like an SQLite is missing in the sentence above.

2008-11-13
36SUGGEST

In the ‘Objective-C Properties’ box, you very briefly describe the property and synthesize compiler directives.
I feel these should really have a little more explanation.

Either way, for your external references, the apple docs has a simple explanation in the ‘Learning Objective-C: A Primer’, ‘Properties’ section.

and a full breakdown in the ‘The Objective-C 2.0 Programming Language’ doc, ‘Declared Properties’ chapter
(not sure if I’m allowed to post direct links to apple docs here?)

2009-01-15
47ERROR

The sample code block on this page, and its fuller implementation on the next page are poorly presented.

"
- (UITableViewCell )tableView:(UITableView)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @“Team”;
"

It is not made clear that we are not to add this as a new method, but instead should be modifying a single line of an existing method.

Additionally, you suggest calling the cell identifier by the name ‘MyIdentifier’ when the default generated method uses ‘*CellIdentifier’.

Also, you do not setup MyIdentifier to be a pointer as the generated code does.

Then on the next page you give the full implementation of the method. I would suggest instead collapsing these into a single code sample, and stay as close to the system generated method as possible and highlight only those lines of code that are different than the default code.

2008-11-21
47OK

The sample code block on this page, and its fuller implementation on the next page are poorly presented.

It is not made clear that we are not to add this as a new method, but instead should be modifying a single line of an existing method.

Additionally, you suggest calling the cell identifier by the name ‘MyIdentifier’ when the default generated method uses ‘*CellIdentifier’.

Also, you do not setup MyIdentifier to be a pointer as the generated code does.

Then on the next page you give the full implementation of the method. I would suggest instead collapsing these into a single code sample, and stay as close to the system generated method as possible and highlight only those lines of code that are different than the default code.

(AND AGAIN I had to use my back button to save this post since your system seems to have silently ignored it since I originally copied in some of the sample code… How can we effectively use this reporting system if neither hyperlinks (to a pastie) nor code samples seem to be allowed?)

(Dave says: I disable posts with hyperlinks because we see a LOT of spam attempts. The alternative would be to require to to log in to post)

2008-10-09
49TYPO

implemtentation should be ‘implementation’

2009-01-16
51TYPO

verticle should be vertical

2008-12-03
25ERROR

Echoing the first comment since it seemed to miss the last rebuild of the book. The buttonClicked: method only worked for me when I changed the expected result type from void to IBAction.

2008-10-24
176TYPO

First sentence, second paragraph of 11.4 has a typo in it. “Surfface” —> “Surface”.

2008-10-24
51ERROR

You state:

“Save the nib and let’s Build & Go again. Now if we rotate the device it
does what we want. Go ahead and rotate it a full 360 degrees. It should
behave how we expect in all cases.”

I think that most users will be doing a ‘build & go’ with the simulator as the target and not running this bit of test code on actual hardware. There is no way (at least as far as I can tell) to turn the simulator 360 degrees and ever get to the upsidedown portrait view. I can only get it into standard portrait and left horizontal positions.

2008-12-03
52SUGGEST

Personally I would not have added the ‘(surprise, surprise)’ as it implies that everything that has preceded has been really easy.

I would additionally comment that so far in the book I have been getting good at copying and pasting code, but I don’t feel you have been really teaching me much to understand what the code I am copying really means, and how I would go about knowing how to implement it when I am creating my own app.

See Hillegass’ Cocoa Programming for OS X for a much more instructional style. I heard the authors in a recent podcast episode saying that they were targetting people who are experience developers, but not experienced with cocoa/obj-c/cocoa touch. It actually feels so far like they are really targeting existing mac developers, who just want to expand into iPhone dev as well. My $0.02. :-)

2008-12-03
37ERROR

By using example, code doesn’t work as expected.
In ordre it works, i add in textFieldShouldReturn method of EditorViewController class :
field = textField;

If not, the Label text doesn’t change even if edited.

Maybe, it isn’t the “coorect” solution, but i think there is a mistake.

2008-12-16
noneOK

The overall book is great, but I think there needs to be a short primer on Cocoa in general. Since I only know the very basics of Cocoa, I did get a little lost.

2008-12-16
86ERROR

“You might have noticed that the value retur ned by NSHomeDirector y( )
function is an NSString, not some sort of “NSFile” class. That’s because
in Cocoa, files are always paths represented as strings."
or NSURLs with the file:// scheme.

2008-11-13
14ERROR

Whoah…. What a mess. You start dropping terms like UIKit object and nib file, without ever explaining what they are. Luckily, I happen to know what these things are, but I don’t know them from your book.

2008-12-16
69SUGGEST

“Once saved, go set File’s Owner to be PlayersTableViewController.” - being a beginner, I have no idea how to do that, so I imagine you’re asking me to check some text previously - be nice to let me know where I can read about it (again - because I forgot).

Same goes for “Assign that table view to be File’s Owner’s view outlet.” - yep, no idea…

2009-01-15
17TYPO

In the first paragraph: “When the device rotates the label’s superview…” should have a comma - “When the device rotates, the label’s superview…”

2008-11-21
19TYPO

Second paragraph, second sentence. “its” should be “it’s”

2008-12-16
76TYPO

“Control-click the Navigation Item. Notice the three button related outlets: backButtonItem, leftButtonItem and rightButtonItem.” at the bottom of the page is missing the “Bar” bit out of the outlets - should be:
backBarButtonItem, leftBarButtonItem and rightBarButtonItem

2009-01-15
82SUGGEST

It would seem for the File System Explorer App, it’s assumed the reader will just follow along with the sample code. This is a departure from previous chapters that were very specific about the steps necessary with Xcode and Interface Builder. It would be nice to have those steps laid out ( like what type of project to start, etc) or to have a more explicit note about wanting the user to follow along from the sample code.

2008-11-13
34TYPO

Just after adding the code from the begining of 2.5 Creating the View Controller, I have two errors that at the end of the chpater, still there and of course can’t run the Starter Project. This is my third try so maybe is something wrong someplace. The errors are in the EditorViewController.m. There are also two warnings but they are normal in this stage of the project.

I don’t know if I missed it but I don’t know where we can dowlonad the full project in case something is wrong, to double-check that the code from the book is ok.

I tried to download some of the files and I see some differences between the code created by default by XCode and the code that appears in your files, for example:

// Override initWithNibName:bundle: to load the view using a nib file then perform additional customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString )nibNameOrNil bundle:(NSBundle)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
}
return self;
}
*/

that in some of your files appears uncomented and I can’t see any reference on your pdf/book,

and that’s all, thanks for giving us the oportunity to have such book in the initial state before they are ended and printed, thanks a lot !

regards,

r.

2008-10-08
28ERROR

code snippet: if you do not add #import “EditorViewController.h” into StartViewController.h just after #import <UIKit/UIKit.h> you will get error because it says that EditorViewController is undeclared.

2008-10-08
33SUGGEST

“And then make the connection in IB from the File’s Owner to the text field in the user interface”
I’m working on IB with Editor.xib: if I control-click on “File’s Owner” and drag on the text field it prompt me to choose “field” or \t “view”… what should I choose?

2008-10-08
35SUGGEST

after building my application, when I click on edit, an empty window shows up instead f the edit window…. what did I do wrong?

it would be good to include a quick troubleshooting guide when something does not compile or it compile but it does not work as expected.

2008-10-08
32SUGGEST

I became completely confused when I hit section 2.4 Configuring The Text Field because up to that point there was no mention of any text field, nor had we created one yet. It took me some time to figure out that 2.4 was a general discussion and that the exercise continued in section 2.5 - several pages later.
Please re-work this transition.

2008-10-08
41TYPO

Last sentence of first paragraph should read “You just have to add your custom…”

2008-11-21
37ERROR

I did not find anywhere in this chapter were you instruct the user to synthesize EditorViewController and set its property

I found the code only when reviewing your code samples. It won’t work without this.

I am enjoying working my way through your book and glad to have it!

2008-10-08
58ERROR

The first full paragraph, which attempts to set up the navigationItem, doesn’t work at all. Perhaps the instructions are unclear and I messed up the demo, but when I drop off the Navigation Item into the AddTeamViewController window (which contains File’s Owner, First Responder, etc.) I am unable to control click the File’s Owner to the navigationItem of the Navigation Item because nothing pops up when I release the control+click while I’m hovering over the Navigation Item. Help would be greatly appreciated here.

2009-01-17
101SUGGEST

The book suggest that the Utility template is being used to generate the FlippingPreferableClock application. However, the example program has three views and a single controller, which certainly is not generated by using the Utility template, as such an app has three controllers. I think it would be better to either use the Utility template, or to explain more clearly how one can add a settings view to an existing app.

2008-11-13
44TYPO

“They are also really good at letting you drill down into heirarchies of data.”

‘i’ before ‘e’, except after ‘c’ ;)

2008-11-21
allSUGGEST

While it’s great to have ANY book on the SDK at this time, may I suggest that you give your PDF a good spelling and grammar check even at this point. Nearly every page has irritating errors.

it would be a good idea to point out right in the introduction that the sample code is available on the website and that it is most helpful if people access it when trying to overcome roadblocks.

Looking forward to all the chapters ahead and the final masterpiece!

Grandpa Brian - publisher of apps for serious hockey folks.

2009-01-15
44TYPO

Additionally, “hieirarchy” should be spelled “hierarchy” and “heirarchical” should be spelled “hierarchical”.

Is it just me or does the word hierarchical look stranger and stranger the more you look at it?

2008-11-21
56TYPO

Last line of page - “palatte” should be “palette”

2009-01-16
64SUGGEST

I think this chapter could use a simulator screenshot of the add team view showing the text field and the navigator item.

2009-01-16
39TYPO

In the second paragraph of page 39 there is a sentence that reads:

“This is because the only the the
compiler knows about this point is the forward declaration we placed
in the header”

That makes no sense whatsoever. Hopefully it gets fixed.

2008-10-08
25TYPO

In the code listing for the buttonClicked: method, the line that currently reads:

center.y +- 100.0f;

should read instead:

center.y += 100.0f;

2008-10-24
ch3SUGGEST

Your coverage of tables is, frankly, really weak. This is one of the key features of this platform and needs substantial focus. I would like to at least see the addition of table indexes along the right-hand side of the screen and doing anything more than displaying a simple text line in a cell.

Thanks for considering. Elia

2008-12-16
42TYPO

“Though you could set any object to serve as a table view’s data source, you’ll almost always have your UITableViewController play this roll”

roll => role

2008-11-21
63TYPO

“With the delcartion added” should probably read “With the declaration added” in the second-to-last paragraph.

2009-01-15
56ERROR

Second paragraph of 3.11 should be .xib instead of .nib (two times here). This isn’t the only occurance in the book, just as an example here.

2009-01-16
131TYPO

commuincation -> communication (last line of the page)

2008-11-13
41TYPO

In last sentence of first paragraph,
“You just have add your custom implementations to pre-existing methods for the features you are interested in using.”

Should read "You just have to add your custom implementations to pre-existing
methods for the features you are interested in using.

2008-11-21
129TYPO

Last 3 bullet points say “File’s Onwer” instead of “Owner”. 4th bullet on next page is correct.

2008-11-13
176179TYPO

Inconsistent in using “OpenGL” vs “Open GL” (with a space). I believe the accepted standard is OpenGL without spacing, even when used with ES as in “OpenGL ES”, though it may be worth confirming. Regardless, you alternate between the two frequently and at the very least should choose one and be consistent.

2008-10-24
174TYPO

‘CALayer’s are order on two properties’
should read
‘CALayer’s are ordered on two properties’

2008-10-24
176TYPO

first sentence contains ‘effects’ - this should be changed to ‘affects’.

2008-10-24
173SUGGEST

General comment about section 11.3 - you need to provide a little more background - flesh out what you mean by ‘other detailed operations’ with an example.

I really think that having an example with a more complex example (eg, have some layers move along a predefined path, eg sine wave) would be a good idea.

2008-10-24
36TYPO

Incomplete sentence, Paragraph 3, Sentence 3. “Allowing the second object to be written independently from the
first.” This clause should probably be tied to the preceding sentence with a comma, not a period. Or perhaps start the sentence: “This allows the second object to be…”

2008-11-21
allTYPO

Its and It’s are misused throughout the text, although not consistently. Some samples: p19,p20(twice) “its” is used where “it’s” is needed for “it is” in three successive paragraphs. Then both “its” and “it’s” are used correctly in the next paragraph (beginning with “Once it’s launched”. And “it’s” is mistakenly used as a possessive instead of a contraction, such as on p16 and p17 where the term “it’s superview” is mistakenly applied.

2008-12-16
168OK

Hi,
I think this chapter should also show how to detect swipes such as left or right.

2008-12-16
99SUGGEST

It seems that the book took a drastic turn at this point. Previously, I was able to follow along in the book and build the sample applications as I read the chapter. Now, it seems like we’ve shifted to a “download the sample code and follow along”. I like the first approach much better.

2008-11-13
199SUGGEST

A chapter on testing would be useful.

2009-01-16
57TYPO

The .nib files in the second paragraph are .xib files.

2008-11-21
47TYPO

the last paragraph of page 47 (Beta 3.0) says:

“Before
we do, let’s walk through each code to understand what it’s doing. ”

I think it should read:

“let’s walk through each LINE OF code to understand what it’s doing.”

2008-11-21
58SUGGEST

Exchange first and last paragraphs then the AddTeamViewControler nib file will work.

2008-12-02
59TYPO

propmted ==> prompted

2008-11-21
59SUGGEST

“Control click the File’s Owner to the “Navigation Item” and assign
it to the File’s Owner’s navigationItem outlet." ==> I don’t think this action can be done yet because we haven’t created the AddTeamViewController yet.

2008-12-02
65TYPO

everyone ==> everything

2008-11-21
134ERROR

I’m fairly new to SQLite, so forgive me if I’m wrong here… but might you be better off calling sqlite3_prepare_v2 with –1 as the third parameter, to let it determine the string length? While something like this might be done for a performance advantage (probably small, since developers will likely cache the prepared statement), the SQLite documentation says that the third parameter should be the length in bytes, including the terminating null. The example on the top of page 134 would seem to have two problems, then: first, the count doesn’t passed to sqlite3_prepare_v2 doesn’t include the null terminator; and second, the count being passed is the number of Unicode characters in insertStatementNS, not the number of bytes in the UTF-8 string (if there are any wide characters in the UTF-8 string, the number of bytes will be greater than the number of characters).

If I’m way off here, I’d appreciate it if you could set me straight: dave@ruske.com.

Thanks —- and by the way, great book!

2008-11-13
84TYPO

In chapter 5.2, the first and second paragraph say almost the same thing.

[First paragraph]
“In a real world application you’d build out a set
of model classes to represent your data and then store that data in a
database or file (I prefer a database). For this simple example though
we will just use NSDictionary objects to hold the data.”

[Second paragraph]
“The first thing we need to do for our example is to create the data. In
real world applications you would develop a set of model classes that
would contain the data and then persist their infor mation into either a
database or file. In our case we are going to keep it simple and just use
NSDictionary and hard code the data.”

2008-11-21
129ERROR

The first two of the bottom three bullets that explain connection of the Outlets to the views should read the other way round: “Connect File’s Owner to the text field” and “Connect File’s Owner to the UIView”
If you try connecting the other way round, the suggested outlets don’t show up and you can’t connect.

2008-11-13
43TYPO

3.2 - Feeding data to a table view

Third paragraph, first sentence:

“…play this roll.”

Should read:

“…play this role.”

2008-11-21
65TYPO

4th sentence “NSIndexPaths we us NSArray’s” should be “use’ not ”us"

2008-11-21
32SUGGEST

In the first complete sentence of the page under figure 2.5 you say:

“Select the Files’ Owner object and you’ll see the action and the two outlets that you just added.”

You don’t mention anywhere where you are supposed to look for the outlets and actions. I suggest that you might want to mention that you will find these recent additions in the identity inspector (cmd+4) for the File’s Owner object.

2008-11-21
33ERROR

“In the wizard that pops-up choose the UIViewController subclass item in the iPhone OS -> Cocoa Touch group.”

The group is actually called “Cocoa Touch Classes”.

2008-11-21
40ERROR

“Select the new view controller and open the Attributes inspector (Command-1). Set the nib file name to Editor and then set the class name to EditorViewController.”

This implies that the nib file name and class name are on the Attributes Tab when the classname is on the Identity tab (command-4).

2008-11-21
179TYPO

The second sentence of the page reads “…and still get some much done…”. It should probably say “…and still get so much done…”.

2008-10-24
29TYPO

The second sentence on the page reads “…you can look at just the icons, which is they way…” this should probably read “…you can look at just the icons, which is the way…”.

2008-11-21
92TYPO

truncated sentence (maybe still being worked on?):
…“make just about any type of”

2008-12-16
35TYPO

In the first paragraph there is a line that describes the first responder that reads “The first responder is the object that is first inline to get certain types of events..” and it should probably be “in line” rather than “inline”.

2008-11-21
40TYPO

The second sentence in the last paragraph reads “You have just build…”, but it should probably say “You have just built…”.

2008-11-21
44SUGGEST

In the first few sections of this chapter the term section was thrown around several times. I had already played around with UITableViews before and still found myself a bit confused on what a section was. I think this would be an appropriate place for the anatomy of the UITableView, i.e., for a picture of a UITableView with at least two or more sections and labels of what each piece of the UITableView is (e.g., section, row, parts of the UITableViewCell, etc.).

2008-11-21
84SUGGEST

in the code, there’s a [self createData]; but no mention of why it’s there (on this page) - do I add that new line now, or…?

2008-11-21
55TYPO

In the first sentence of the third paragraph you have the following phrase “…by providing us will an already implemented…”, but I believe that “will” should be “with”.

2008-11-21
136ERROR

The query code that appears similiar to…

const unsigned char* itemValueC = sqlite3_column_text (dbps, 1);
NSString *itemValue = [[NSString alloc]
initWithCString:itemValueC encoding: NSUTF8StringEncoding];

and others of a similiar type produce an error. A simpler line for this which does not produce errors would be:

NSString value = [NSString stringWithUTF8String:(char)sqlite3_column_text(dbps, 2)];

2008-11-13
40TYPO

To help explain the ‘Set the nib file name to Editor..’ section, a screenshot of the Attributes panel with the field shown would be helpful, or perhaps directly reference it as the ‘NIB Name’ field. I accidentally set the title field the first time, and had to retrace my steps to catch this one.
Could perhaps point out/show that in the ‘Editor View Controller’ window, it says ‘(Loaded from Editor.nib)’ to confirm the correct settings are in place.

2008-11-21
60TYPO

We need to do two things ==> We need to connect two things

2008-11-21
61TYPO

passing in. the ==> passing in the

2008-11-21
2727SUGGEST

[Note: I really want this book to succeed, so take this and all my future suggestions in the constructive way in which they are intended.] There’s no explanation of what a File Owner is: a “Joe Asks” would be really appreciated here.

2009-01-15
62SUGGEST

We then push it onto the
navigation controller’s view controller stack. ==> May also want to mention after this line that an import statement is needed for AddTeamViewController.

2008-11-21
62SUGGEST

It may be obvious to most, but when you say “Add the following code to addButtonWasPressed.” It might be good to point out its in RootViewController and not the current open file.

I also has to add #import “AddTeamViewController.h” to RootViewController.m before the code would compile.

2008-11-21
53ERROR

Xcode 3.1.1 generates viewDidLoad with the edit button on the right of the bar, not the left.

2008-12-02
43TYPO

“how to handle the reordoring of rows”
->reordoring

2008-11-21
74TYPO

MyIdentifier is a variable, not a class, so shoud be myIdentifier and not MyIdentifier (should start with lower case letter)

2009-01-15
29TYPO

… “UIKit developers prefer since its smaller and they
recognize the icons.”

should be:

“UIKit developers prefer since it’s smaller and they
recognize the icons.”

(mind the apostrophe in it’s)

2008-11-21
58SUGGEST

In chapter 3 we do some pretty cool but complex stuff. We learn how to add and remove items form a table view.

Now, near the end we create a new nib file with the textField where we type our new entry’s name. We set up the AddTeamViewController as the delegate programatically, but couldn’t it have been done in Interface Builder as well?

From what I have seen there are several ways to do things in Xcode and Interface Builder.

We also set up the keyboard to show a “DONE” key instead of return, again I did that in Interface Builder.

I was just checking to see if both ways are ok, because sometimes I get confused as to what I can and cannot do within interface builder that must be done in code.

From Felipe Laso

2008-11-21
allTYPO

in addition to #35040, since I’m bored tonight, a quick grep gives the following places where it’s should be its and vice versa:

Missing apostrophe:
18 “If its easier to find what you are looking for”
18 “100% accurate but for now its close enough”
20 “updated the UI and the code now its time to run,”
21 “Once its done compiling”
21 “Once its started try rotating the device”
25 “its the same file we started with”
29 “developers prefer since its smaller”
32 “Now its time to create the new view”
40 “now its back to Inter face Builder”
183 “you might miss when its over”

superfluous apostrophe:
29 “and change it’s text to read ’Original Value’”
29 “and change it’s title to be ’Edit’”
81 “Each view controller gets it’s own tab”
167 “or passes it on to it’s nextResponder”
186 “last (on top) because it’s zPosition is set”

2009-01-15
2525SUGGEST

It would be rather helpful, in chapter 2, to give an illustration summarizing what we are going to do before we do it. Show both controllers, both xib files, and the relationships between then. Then, describe how to make these files. As it is, I feel like I’m just blindly wandering about, with no sense that of our overall goal.

2009-01-15
13SUGGEST

The step to customize the Xcode Toolbar does not seem to be necessary for people who have just downloaded Xcode, since it seems to be included in the Toolbar by default now. So, you may want to acknowledge that this section may be skipped if people already see the Overview pulldown in their Xcode toolbar.

2008-11-21
13TYPO

in last paragraph:

now—>Figure 1.4, on the next page shows the Overview item being dropped on the left side of the toolbar.

correction—>Add a comma after “on the next page”

2008-11-21
14SUGGEST

In the first paragraph: References to “the list” actually refer to the file list on the right side below the toolbar. However, there is no prior reference to this area, so the reader is left to mistakenly infer that “the list” refers to the “resource” list on the left. There seems to be a few missing sentences between the first sentence and the second sentence of this paragraph.

I would also suggest using the term “Groups & Files” list instead of “resource” list so that it is easier to match up with the actual Xcode GUI.

Overall, this paragraph should be rewritten to be clear as to which area the clicks are occurring in and which area things are being displayed.

2008-11-21
14TYPO

missing comma after “refactoring” and missing period after “etc” in “refactoring, etc.”

The button is labeled “Build and Go”, not “Build & Go”.

could also use more commas, such as after “Now that we have our whirlwind tour of Xcode ” and “In order to make that happen though

“lets run” should be “let’s run” (missing apostrophe)

would be better to say “another one of the major tools” instead of “another of the major tools”

2008-11-21
15TYPO

“UIs” not “UI’s” (should not be possessive)

also, more commas would be helpful:
sec 1.3, para 1, line 3: as the name implies
sec 1.3, para 1, line 7: As with Xcode
last para: Once the simulator launches

2008-11-21
15SUGGEST

“Open the HelloViewController.xib by double clicking on it in the Resources group in Xcode.”

The file can be opened by clicking on it anywhere (in either the left “Groups & Files” pane or the right “File Name” pane (if either the project or Resources is selected)). So, the above instruction is confusing and unclear as to what to do where.

The instructions for configuring the label fail to mention that the label must be the item selected. It is easy to accidentally deselect the label so that the Attributes inspector, for example, is actually for the background/view and not the label itself. A screen shot of the related Attributes inspector would be helpful.

2008-11-21
16TYPO

Figure 1.5 shows the library, not the IB Attributes Inspector, so the caption is incorrect.

“XML equivalent” is probably more precisely expressed as “XML version” or “XML-formatted”

missing comma:
Since the nib file type has been around since Mac OS X 10.0(and even before in NeXTStep)and .xib is relatively new people still refer to them as nib files.

2008-11-21
18TYPO

missing commas
Before we dive into the code
Once you have selected a file in the list

The two missing apostrophes mentioned in #35113

2008-12-16
18SUGGEST

from the preceding page, it states: “Figure 1.7, on the following page shows”

Since the words “Figure 1.7, on” was on page 17, I interpreted “the following page” to be page 18, but the figure is on page 19. Would be better to specify “Figure 1.7, on page 19, shows” (also note the comma after the page number)

“superview” is used without explicitly explaining what it is.

“If its easier to find what you are looking for you can
hold down the option key and click and Xcode will display the symbols in alphabetical order.”

The above sentence is confusing. It does not tell you that you need to be clicking on the symbols pulldown. It should also be rewritten to explain at the beginning the purpose of this alternative.

For example: If it would be easier to find the symbol from an alphabetical list of symbols, you can option-click the symbols pulldown, and Xcode will display the symbols in the code in alphabetical order.

You can add a special feature to explain to people who don’t know how to “option-click” or “control-click” something so that you can use these more concise terms in the rest of the book.

2009-01-15
19TYPO

This page has figure 1.7, but the label and caption is missing for the figure. In addition, the screen shot should be annotated so that it is clear what parts are the struts and what parts are the springs.

It seems like a waste to have a single screen shot take up the entire page. Perhaps 3 screen shots, one showing struts on, one showing springs on, and one showing a mix would be a better use of the space. Or step-by-step screenshots from the default setting to the desired setting (take off two struts and add two springs).

2008-12-16
47TYPO

initWithCoder function indentation closing the if statement and return are tabbed in an extra tab.

2008-12-02
44SUGGEST

“For the common case there will be just one section, but when multiple sections are called for the UITableViewDelegate protocol provides methods that let you customize header and footer views for each section, naming and demarking what their rows represent.”

I had to re-read the above sentence 3 times before I understood it… Shouldn’t there be a comma after “called for”?

2008-11-21
24SUGGEST

I have just worked through the first two chapters. Note I have worked through the Apple tutorial as well.

Content wise the first couple of chapters is good. But I think the Apple approach of working through the basic “hello world” type program without using a predefined template is instructive. I think this should be part of the first chapter.

Some parts of the book are also a bit wordy. eg:
You really did your first VC in the Chapter 1, Hello iPhone, on page 9
but we did not spend any time going into the details as we were too busy
building our first iPhone app. When you wanted to enable rotation for
your first application you made a small modification to the subclass of
UIViewController which we called HelloViewController.

That first sentence could have stopped after “page 9”. This is pragmatic after all. Concise sentences please!

2008-11-21
21TYPO

missing commas (and apostrophes mentioned in #35113):
Once it’s launched

Once its done compiling, packaging and signing your application

Once its started

Congratulations

2008-11-21
21SUGGEST

“choose the Properties tab”
This tab does not exist if person has a new install of Xcode and has not setup devices/provisioning profiles. Assuming that many of the readers will be in this situation, there should be a mention of what is “wrong” if one does not see the Properties tab.

You do not explain why one should choose between making a specific provisioning profile for use with the examples in the book versus using an existing profile. A person who is new to all this would not know what factors to consider in deciding which way to do things.

The screenshots and text should be updated to reflect the selection of OS 2.1 (which is what people who have just downloaded Xcode see).

I agree with others that it is very disappointing that the steps for getting to the point where the provisioning profile is installed properly are completely skipped. If it is too long for the text, perhaps an Appendix would be a place to put it. Given this is supposed to be targeted for people who have not developed for iPhone before, this is a big gaping hole. By not adding the steps, readers are forced to spend a lot more time to get this last step working. Thankfully, in your discussion forum, someone had pointed to a URL that was very helpful for getting this set up.

2008-11-21
70TYPO

the first line of page 70 reads:

“The main task of our navigation control is to maintain the stack of
view controllers.”

I believe it is a NAVIGATION CONTROLLER, not navigation control.

2009-01-15
57TYPO

“In Inter face Builder’s Library palatte, type “text”"

palatte -> palette ?

2008-11-21
59SUGGEST

On page 59, we’re told to drag a Navigation Item into the Inspector and then connect it to the File’s Owner’s navigationItem outlet. However, as far as I understand it, this is only possible after the AddTeamViewController.m file has been created and the File’s Owner’s Class has been set to AddTeamViewController, which is what we’re told right afterwards, on pages 59 and 60.

So in order to get this working, you’ll first have to create the Class File and its contents, then tell File’s Owner the correct Class name and then add the Navigation Item.

2008-12-02
62TYPO

First things first we’re creating a new instance of AddTeamViewController.

Remove “First things” or put a colon after the second “first” ?

2008-11-21
57TYPO

In the first paragraph, the sentence “Once we’ve entered the name and press save,…” should instead be “Once we’ve entered the name and pressed save,…”.

2008-11-21
65SUGGEST

In the code sample, rather than calling the tableView method directly, why not use the tableView property instead? So, the code for notifying the UITableView object of a change would look like:[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];

2008-11-21
63TYPO

In the viewDidLoad method, you set the UITextField delegate and return key type on the text field programmatically when both can be set easily in IB, the latter through the same technique shown in the previous chapter and the former through a simple control-drag from the text field to the File’s Owner object in the inspector. I think it would be better to do everything possible through IB.

2008-11-21
26TYPO

Would be nice to have the keystroke sequences enclosed in boxes (see page 21) as opposed to just in parenthesis.

2008-11-21
28TYPO

It is not really clear where to add the code to the BottonViewController.m file. Perhaps it will be helpful to provide some guidance similar to that for adding code to the .h file (… above the @end directive…). Also, the last line of the previous page should have a colon instead of a semi-colon (…some code that looks like this; )

2008-11-21
71ERROR

Need to get rid of the creation of the PlayersTableViewController in code and move it to the nib file.

2009-01-15
127ERROR

The book says that sqlite3 is provided by OSX, but I can’t find it anywhere on my system. Did the author already have it installed from an outside source, and just think it came preloaded?

2008-11-13
179TYPO

Missing . (dot) in the last sentence of the first paragraph in chapter 11.2.
“All the drawing, animation and other visual features of a view are directly
or indirectly handled by the layer ” <- no dot

2008-10-24
59ERROR

AddTeamViewController.xib

Connecting the File’s Owner to the Navigation Item doesn’t work.

You either need to move this to section 3.12 and add additional information about adding a navigation item outlet, or move the section on creating the AddTeamViewController class to this section and explain how to add the navigation item outlet. Once the class and navigation item outlet have been created (and the class assigned to the File’s Owner) the existing paragraph will work.

2008-12-02
139TYPO

A double “that” in a sentence (middle of the first paragraph).

" In March, measurement firm M:Metrics said >>> that that <<< their studies showed that 84.8 percent of iPhone users said they accessed news and information with their phones, as compared to 13.1 percent of the overall mobile phone market and 58.2 percent of smartphone owners ."

2008-11-13
141TYPO

All bullets in the bullet list on the bottom of the page have File’s Onwer instead of File’s Owner.

2008-11-13
55ERROR

Section 3.10 looks to be missing the @synthesize for the addbuttonItem.

2008-11-21
42TYPO

First paragraph, last sentence, you have, “You just have add …”. Should be, “You just have to add …”.

2008-11-21
43TYPO

Second paragraph, 4th sentence, you have, “You can create custom subclasses that you adopt …”. I think you want to say adapt instead of adopt.

2008-11-21
60SUGGEST

It would be helpful if common mistakes that people run into might be mentioned at each step and the solution provided.

I, for one, missed adding the both on page 59 (since it wasn’t mentioned explicitly) and also on pages 33-34. While everything compiles, I did not understand why the outlets were not being recognized in IB. So, a tip to the user (at page 33/34) would be that if the outlet isn’t being recognized when the class is set for the File’s Owner, then check to make sure that the class has indicated that it is implementing whatever the particular protocol is.

2008-11-21
53TYPO

Last paragraph, second sentence, you have, “It turns out, as usual, that’s
it’s …”. You probably wanted to say “that” instead of “that’s”.

2008-11-21
59TYPO

Second paragraph, first sentence, you have, “Our AddTeamViewController views needs …”. The word “views” should be singular.

2008-11-21
70SUGGEST

“We want a table view in this case, so delete the view and replace it with a UITableView.”

It would be helpful to be more explicit about how to perform this step. Deleting the view object and adding another view object does not change the view object from the default one provided by IB. Instead, one can set the class of the view to be UITableView in the Identity tab for the view object.

2009-01-15
70SUGGEST

Would be helpful to note to readers that if one does not see the “view” outlet after assigning the File’s Owner to be PlayersTableViewController (so that one cannot assign the table view to be the File Owner’s view outlet), then one has forgotten to specify that PlayersTableViewController is a subclass of UITableViewController (since Xcode makes it a subclass of UIViewController by default).

2009-01-15
72SUGGEST

“You could run this code now but your player’s table view will be empty because we haven’t implemented its UITableViewDataSource methods yet.”

This above sentence seems to discourage readers from trying to run the code. It seems to imply that it would not be worthwhile to try running the code now. It would be better to rephrase it so that it encourages readers to run it (and therefore debug up to this point).

As noted in #34847 for B2.0, you need to add
#import “PlayersTableViewController.h”
to the top of “RootViewController.m”
in order to be able to run the code.
This should probably be mentioned and shown at the beginning of 4.6 (on the previous page).

2009-01-15
65TYPO

In the last paragraph, second sentence, you have, “You’ll use this techniques …”, The word “this” should be “these”.

2008-11-21
82TYPO

In the third paragraph, first sentence, you have, “… six different view controller that …”. The word “controller” should be plural.

2008-11-21
19SUGGEST

The discussion about navigating in Xcode should be a note or some type of other reference as it brakes the flow of what you are trying to describe.

2008-11-21
14SUGGEST

In the second to the last paragraph you reference Build & Go button but most places you also reference the key combination, I think you should mention the key combination is Alt + Command + R. In addition, Xcode uses Build and Go not Build & Go if you want to be consistent. This is also the case on page 15 and 21. On page 20 it is Build & and Go button.

2008-11-21
20SUGGEST

Section 1.5 is the first time you mention provisioning profiles and developer certificates. This was very confusing for me. I think you at least need to provide a definition at a minimum but preferably a full explanation or side bar.

2008-11-21
24SUGGEST

The introduction to chapter 2 is the first time MVC is mentioned and it is not defined. While most readers may understand what you are talking about many may not. Especially other mobile developers like J2ME developers where there is not an MVC. I think this should be defined and mapped to the MVC components on the iPhone some where. Preferably in the first chapter before Controllers are even introduced. This could be a sidebar if it does not fit any other place.

2008-11-21
24SUGGEST

In section 2.1 when you instruct the reader to add a button you might want to be specific and ask the reader to add a Round Rect Button if that is the type of button you want them to add.

2008-11-21
24SUGGEST

Section 2.1 is the first time you mention the nib’s document window. You might want to explain what that is and what you can find in it. You should also probably explain what the File’s Owner object is.

2008-11-21
54ERROR

In:

if (editingStyle == UITableViewCellEditingStyleDelete) {
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
withRowAnimation:YES];
[teams removeObjectAtIndex:indexPath.row];

You must call tableView:deleteRowsAtIndexPaths: the first and NSArray:removeObjectAtIndex: the second.

2008-11-21
88TYPO

on the last sentence on the page, you have the word “fiver” instead of “five”.

2008-11-21
95TYPO

In the “Application-Name” bullet point, fourth sentence, you have, “On the actual device device, …”. Too many device’s.

2008-11-13
25SUGGEST

The code list on this page may not have enough context. I know for example, I originally put the header file line inside the {} and got compiler errors. So it may depend on how experienced with ObjectiveC you assume your readers have.

2008-11-21
30SUGGEST

In section 2.3, outlets and actions are used but not defined.

2008-11-21
30SUGGEST

In section 2.3 it states “go back to Interface Builder and you’ll see the action and the two outlets that you just added”. You might want to tell the reader where they will see that.

2008-11-21
110TYPO

In the last paragraph, second sentence, you have, “… since that’s what what …”. You should remove the second “what”.

2008-11-13
127TYPO

In the fourth paragraph, second sentence, you have, “Like most databases, works with SQL …”. I believe you wanted to say, “Like most databases, sqlite3 works with SQL …”.

2008-11-13
49SUGGEST

Using what I think is the latest version of the iPhone SDK, the method cellForRowAtIndexPath is already defined using a CellIdentifier. The code on page 48 has us create an index called MyIdentifier and then states we do not need to modify any of the other lines. One page 49, section 3.7 the code shows the correct option of using MyIdentifier in the correct places, in contrast to the “not need to modify any of those lines” in the previous page. This could be a little more clear otherwise people could miss it. You may also want to mention removing the original CellIdentifier NSString though it really does no harm.

Thanks!

Mike

2008-11-21
39ERROR

In the second paragraph of section 2.7, I am confused by the statement, “Select the new view controller and open the Attributes inspector”. Maybe I am just confused by the new part since the previous paragraph asked me to open the original controller.

2008-11-21
140ERROR

The method declaration for handleGoClicked: should be of type IBAction so that it can be easily hooked up in IB.

- (IBAction) handleGoClicked: (id) sender;

2008-11-13
129TYPO

When it says ‘Navigate to SDKs/iPhoneOS2.0.sdk/usr/lib/’ I can’t find SDKs/iPhoneOS2.0.sdk/usr/lib/ giving a full path (/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk) instead of a relative path would be more useful

2008-11-13
167ERROR

In the first paragraph, second sentence, you talk about popping events off of the stack when actually is is dequeueing from the queue.

2008-10-24
167TYPO

Last paragraph, first sentence, you have, “… as they are popped of the
event queue.” The word “of” should be “off”.

2008-10-24
32SUGGEST

I think section 2.4 Configuring the Text Field should go at the end of the chapter. At that point you have something with a text field you can play with. I know I read the whole chapter and then had to go back to figure out how I was going to play with the keyboard.

2008-11-21
171TYPO

In the second paragraph, you talk about a previous tap example that we have not seen yet. I am assuming that this refers to a section you have not added to the book yet.

2008-10-24
177TYPO

In the paragraph after touchesMoved:withEvent:, second to last sentence, you have, “When the one or more …”. Remove the word “the”.

2008-10-24
178TYPO

First paragraph, first sentence, the abbreviation “etc” should have a period after it. A quick search of the PDF shows inconsistent punctuation for “etc” in many places.

2008-10-24
178TYPO

First paragraph, second sentence, you have, “… and still get some much done …”, The word “some” should be “so”.

2008-10-24
182TYPO

In the first paragraph, second sentence, you have, “There are several built in transition animation that …”. The word “animation” should be plural.

2008-10-24
186TYPO

Second paragraph, first sentence, UIView should be plural.

2008-10-24
186TYPO

Second paragraph, second sentence, you have, “CALayer’s are order on two properties …”, The word “order” should be “ordered”.

2008-10-24
186TYPO

Second paragraph, third sentence, you have, “… then they are order according …”, The word “order” should be “ordered”.

2008-10-24
69TYPO

In the second paragraph of 4.3 “The Back Button” theres a sentence that reads:

“…you create a new instance of
the appropriate view controller class and then pop it onto your navi-
gation controller’s stack of view controllers using the navigation con-
troller’s pushViewController:animated: method”

I believe what was meant to say is that you PUSH it onto the navigation controller’s stack of views. Popping it would be going back in the hierarchy, but what is described here is pushing a view from a selected item.

2009-01-15
80TYPO

I just finished reading chapter 4.

At the end of the chapter we add an edit button to our PlayersViewController.xib file using interface builder. We dragged a bar button item, set its title to “Edit” and connected it to an action. But after reading that, and from what I understood, its much better to add an edit button programatically because of the instant functionality I am given.

When I add it via interface builder I must manually assign it to an action and handle the editing myself, if I add the button programatically its automatically added to the navigation bar, has a title assigned to it and can handle editing immediately.

But, in interface builder when I added the bar button item there is a drop down in the attributes tab of the inspector, that lets me pick the button type. Isn’t this the same as adding it programatically? or is it just so it sets the button image and title?

Is there a way to achieve the same thing with interface builder or just with code?

And one final question, in what cases should I create my own edit button and handle how it responds on my own, instead of using the button thats ready to implement via code?

ViaFelipe Laso

2009-01-15
177ERROR

In the code sample, the test should be triggered if the event.allTouches.count equals 2, not if it is not equal to 2. Aside from being in accordance with the way multi-touch is handled (keeping a full set of all active touches until one or more are discarded after touchesEnded), it also prevents a rather nasty NSRange exception on line 5 of touchesMoved where the user lifts a finger and then moves the remaining one.

2008-10-24
33SUGGEST

“Next we need to add the outlet and property we will use to interact with the text field on the modal view we are about to create.” I suggest adding something like: “And we need to tell EditorViewController to implement the UITextFieldDelegate protocol.”

2008-11-21
34TYPO

In Objective C Properties box
We don’t have space in this book to do a through
explanation

Should be “thorough”?

2008-11-21
33TYPO

“Which ever” should probably be “whichever” (sidebar, “Which ever approach you take”)

2008-11-21
40ERROR

I’m not sure yet, but I think this text:

“Select the new view controller and open the Attributes inspector (Command-
1). Set the nib file name to Editor and then set the class name to Edi-
torViewController.”

Would be more clear if it noted that you set the class name in the Identity Inspector (command-4). Unless I have it wrong, but there’s nowhere to set the class name in the Attributes Inspector.

2008-11-21
55TYPO

In the fourth paragraph, “mimick” should be “mimic”.

2008-11-21
43TYPO

section 3.2, paragraph 3, line 2:

“play this roll”

should be

“play this role”

2008-11-21
48TYPO

3rd Paragraph, 4th sentence. “By convention the idenfier” should be “By convention the identifier”

2008-11-21
64ERROR

The sample program doesn’t work as printed.
The following line:
indexPath = [NSIndexPath indexPathForFow:[teams indexOfObject:teamName] inSection:0];
gives a compilation warning:
/Users/Frank/Documents/iPhone Projects/BasketballTeams/Classes/RootViewController.m:201: warning: ‘NSIndexPath’ may not respond to ‘+indexPathForFow:inSection:’
and also at runtime it crashes at that point.

I do see - in the documentation - that the method +indexPathForRow:inSection: is part of the NSIndexPath UIKit Additions. That might give a clue what to change to make the sample compile and work.

2009-01-15
34SUGGEST

I would strongly suggest Aaron HIllegas Cocoa Programming (isbn: 0-321-50361-9) for an excellent explication of properties.

2008-11-21
49SUGGEST

I just downloaded the latest version of the SDK (I think), and in the code fragment, *MyIdentifier is actually *CellIdentifier in the pre-generated code.

2008-11-21
49SUGGEST

I just downloaded the latest version of the SDK (I think), and in the code fragment, *MyIdentifier is actually *CellIdentifier in the pre-generated code.

2008-11-21
21SUGGEST

It seems to me that this should tell us to choose the Device-iPhone OS 2.1 item, rather than the 2.0.

2008-11-21
15SUGGEST

You should explicitly tell us to turn on the text centering, otherwise the rotating behavior seems like a bug.

2008-12-16
91TYPO

In the second paragraph there is a sentence that reads:

“The cool this about this though is that
the magic is not really magic”

I believe its “the cool THING about this tough. . .”

2008-11-21
80SUGGEST

Lots of talk about making your own button and then re-using it, but it’s not quite clear (yet?) how you’re supposed to do it. Maybe a bit more on this would be useful…

2009-01-15
91TYPO

“If you have more than five controllers the tab controller places the first for and …” => note the last “for” should be “four”.

2008-11-21
49SUGGEST

Hey, I’d really like some more information about how to do a custom UITableViewCell. You don’t cover that.

Thank you.

2008-12-02
82TYPO

for the Inspector the command is:
command+shift+I

(in the PDF is command+shift+1)

2008-11-21
52ERROR

I think the defaults may have changed, but the table rows already resize by default. That is, my view never matched Figure 3.4 — the rows were always expanded… and Figure 3.5 — it’s already set up that way when I open the nib file.

2008-11-21
86TYPO

“File… then choose UIViewController subclass” should read
“File… then choose UITableViewController subclass”.

2008-11-21
allOK

Although the overall book is great, i think explaining the “limitations” of both iPhone and its SDK (storage limits, memory limits etc.) before starting to explain other subjects may be a great addition for readers…

2008-12-16
88ERROR

“Add a table view and connect its data source to the File’s Owner object.”

For clarity,

“Add a table view and connect its dataSource and delegate outlets to the File’s Owner Object.”

2008-11-13
89SUGGEST

There are several code statements throughout the book that make unnecessary references to ‘self’. The sorting methods in StatesAppDelegate contain [self.states sortedArraysUsingDescriptors:…]. The reference to ‘self’ is unnecessary here. Sending a message directly to the ‘states’ NSArray variable is sufficient. [states sortedArraysUsingDescriptors…]. The use of dot syntax is confusing for those without a deep understanding of Key Value Coding.

The ‘states’ method defined in the By[property]ViewController classes is used like an ivar instead of a direct method call. KVC and dot syntax makes this possible at the loss of clarity in the source code.

For style and readability reasons, it is appropriate to declare the ‘state’ method in a separate Category as it is not declared in the Class header file. Using [object message] syntax will make the sorting code more readable.

For example… this is how I re-wrote the code for ByAreaViewController.m

#import “ByAreaViewController.h”
#import “StatesAppDelegate.h”

@interface ByAreaViewController()

- (NSArray *)_states;

@end

@implementation ByAreaViewController

- (NSArray *)_states {
\treturn [(StatesAppDelegate *)[[UIApplication sharedApplication] delegate] statesByArea];
}

- (UITableViewCell )tableView:(UITableView)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @“StateCell”;

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell
\t[cell setText:[[[self _states] objectAtIndex:[indexPath row]] valueForKey:@“name”]];
return cell;
}

2008-11-21
85SUGGEST

No context is provided for the code snippet at the top of the page. It would be helpful to place it in the context of the createData method introduced (without explanation) in the applicationDidFinishLaunching method of the SatesAppDelegate.

2008-11-21
44SUGGEST

decent book, I am more of a visual learner and I think you could have easily explained the table view schema in one diagram. In general more visual stuff would save readers like me a lot of time from rereading on what we could grasp in one glance at a diagram that shows the relationship. thanks
Salim Madjd

2008-11-21
29TYPO

In the sentence “There are three ways to view
the list of items, you can look at just the icons, which is they way
most experienced UIKit developers prefer since its smaller and they
recognize the icons.”, the phrase “…which is they way…” probably should be changed to “…which is the way…”.

2008-11-21
188TYPO

Surfface -> surface

2008-12-16
56ERROR

@synthesize addButtonItem; Is not listed as one of the things to perform before building.

2008-11-21
27ERROR

The image on page 27 seems to be using a dated version of IB. Then again, I could be using a dated version and the authors a updated version. I would hope that the published book is written for the most current version of Xcode and IB and if not a note to the versions of each mentioned in the preface.

2008-11-21
39TYPO

Clicked on StarterViewController.m to open sample text.
In comments is called:
// StarterAppDelegate.m

2008-11-21
40SUGGEST

“Select the new view controller and open the Attributes inspector (Command-1). Set the nib file name to Editor and then set the class name to EditorViewController.”

“Set the class name to EditorView Controller” is not clear. Partly because the class field is on a different screen, under Command-4. I had to download your code to figure out what you meant

2008-11-21
148TYPO

At bottom of the page in the code example, a method definition reads:

-(void) conection:(NSURLConnection *)connection

“conection” is misspelled.

2008-11-13
52ERROR

My Table View Size window differs from yours in 2 ways:
1) Under Frame, the width and height are the same values (320 and 460) but are greyed out - can’t be changed.
2) I can’t select the Springs. When I click on them nothing happens.

2008-11-21
54SUGGEST

Little confusing to have sample code on 53 and then same sample code on 54 with additional code inserted. Could be done at same time followed or preceded by explanation.

2008-12-02
59ERROR

Drag an instance into our AddTeamViewController “Document” window.

Text says Inspector where it should say Document.

2008-11-21
60ERROR

in the AddTeamViewController object inspector window —> in the AddTeamViewController document window

2008-11-21
62ERROR

Build failed.

Need #import “AddTeamViewController.h” in RootViewController.m.

2008-11-21
77ERROR

Somewhere in the description it would be useful to mention that the new Bar Button Item should be control clicked and connected to the File’s Owner for the editButtonWasPressed action

2009-01-15
145TYPO

Last line now reads:
/etc/apache2/others/bonjour.conf.

should be (at least on my machine):
/etc/apache2/other/bonjour.conf.

2008-11-13
56TYPO

- (void)addButtonWasPressed;
should be - (IBAction)addButtonWasPressed; It should use the Target/Action paradigm that was mentioned on page 33

2008-11-21
31TYPO

“the idea of outlets and actions are probably foreign” should say:
“the idea of outlets and actions is probably foreign”

2008-11-21
34TYPO

“We don’t have space in this book to do a through
explanation of Obj-C but…”
should be:
We don’t have space in this book to do a thorough
explanation of Obj-C but…"

2008-11-21
39ERROR

Hi, in the code you have double coding styles within the same if-sentence:

if(nil != editorViewController.field.text && [editorViewController.field.text length] > 0)

If you would stick with your first style, the second part would be 0 < [editor…], but I think you should stick to the second style as it is more straight-forward to read. Reading from left to right, the sentence becomes: if editorViewController’s field is not nil. That is a good sentence. You write: if nil is not editorViewController’s field. While technically it’s the same, reading it the way you’ve written is more confusing. Keep the book consistent and decide one one style, preferably the style that’s easier to read.

Oh, and PragProg uses hyphens all over the place in many of their books. Doe-sn’t look good at all and int-errupts the rea-dingflow. I hope you can just uncheck this style, it even breaks up your code in places (like dismissModalViewControllerAn-imated: on page 38)

Great book, guys, keep up the good work! :) Can’t wait to have it in my hands :)

Cheers

Nik

2008-11-21
33OK

Should explain or have discussion on ‘nonatomic’ and ‘retain’ and any other parameters passed in ‘@property’

Thanks Greg

2009-01-15
40TYPO

‘just build’ should be ‘just built’

2008-11-21
40OK

Second paragraph in 2.6 is not clear to me why I would do this. I would like a longer discussion about why I am doing the steps indicated.

Thanks

Greg

2008-12-16
42TYPO

‘to managing’

should be either:

‘for managing’ or ‘to manage’

2008-11-21
54TYPO

‘passed in the’ should be ‘passed the’

2008-11-21
63SUGGEST

Last paragraph unclear why I am doing the steps indicated. would prefer longer explanation or discussion.

Thanks

Greg

2008-12-02
65TYPO

‘we us’ should be ‘we use’

2008-11-21
60TYPO

‘a application’ should be ‘an application’

2009-01-16
50ERROR

Section 3.8: Supporting rotation was unnecessary when I ran through it as the table seemed already set-up to support proper rotation.

2008-11-21
29TYPO

The very last character on the page should be a colon. It is currently a semi-colon.

2008-11-21
53ERROR

In the viewDidLoad method in section 3.9, XCode generated the editButtonItem on the right side of the navigation bar:

self.navigationItem.rightBarButtonItem = self.editButtonItem;

This could cause confusion in the next section where you instruct users to put an add button on the right side..

2008-12-02
59ERROR

IB will not let me connect File’s Owner to the Navigation Item until after I set up the ViewController class and assign File’s Owner to be of type AddTeamViewController. But the instruction to connect it comes before creating the class in the book. -VincentV

2008-12-02
40TYPO

2.6 The Editing View Controller in Interface Builder

Open the StarterViewController.xib document if you closed it. From the
Library drag out a View |space| Controller into the document. Your window should look something like Figure 2.7, on the following page <—missing period here

next paragraph org text
Select the new view controller and open the Attributes inspector (Command-1). Set the nib file name to Editor and then set the class name to EditorViewController.

edited text – version 1
Select the new View Controller by clicking on its icon in the ‘StarterViewController.xib window. Next, open the ‘Attributes inspector’ (Command-1) and set the nib file name to Editor. Then, open the ‘Identity inspector’ (Command-4) and set the class name to EditorViewController.
edited text – version 2 – referencing dropdown menus
Select the new View Controller by clicking on its icon in the ‘StarterViewController.xib window. Next, open the ‘Attributes inspector’ (Command-1) and select the nib file name Editor from the nib dropdown menu. Then, open the ‘Identity inspector’ (Command-4) and select the class name EditorViewController from the class dropdown menu.

2008-11-21
ch 2OK

A bit about refactoring in one of the early chapters of the book would be nice.

2008-12-16
ch 3SUGGEST

Would be nice to have the swipe to delete function explained for tables.

2008-12-16
93SUGGEST

In reading chapters 6 and 7, I feel like a significant amount of relevant code was skipped in the discussion. I realize that at some point, we need to leave the safety of the nest and venture out on our own, but I, for one, enjoyed and appreciated the detailed walk through of the earlier view controller chapters. Considering how many different elements there are to creating an iPhone app, the audience would be well served to have the detail walk through. Anyways, just my two cents. Thanks!

2008-11-13
0OK

this is a note for the v-bdiphone-v-01.mov… not sure if it effects the book or not…

at timecode: 15:01 talks about Style being set to “Indexed”, my version of IB lists “Plain” and “Grouped” not “Indexed” for the table view.

2008-12-16
0OK

this is a note for the v-bdiphone-v-02.mov… not sure if it effects the book or not… at timecode: 18:51 a line of code (#import “IngredientsViewController.h”) pops on the screen with no voice over noting that it has been added to the project file, and without it, the app will not compile and you get a ‘request for member “ingredients” in something not a structure or union’ error.

2008-12-16
18TYPO

There is no mention of centring the label in the 1.3, which makes the rotation later on not work as expected.

2008-11-21
27SUGGEST

Control click on the button and drag to the File’s Owner object.

I don’t know if this means to control click on the button in IB and drag it to the Files owner. If it does, then it does not work for me. Maybe a better description or an image of what to control click on.

2008-11-21
61SUGGEST

In section 3.12, the following text is confusing. I have reread it about 10 times and I am not sure what it is trying to tell me:

“We need to do two things back to the view controller: The text field and the view that contains the text field.”

2008-11-21
62TYPO

Remove the errant period after passing in:
“We switch to our team adding view by calling pushViewCon-
troller:animated: on our navigationController, passing in. the AddTeamView-
Controller.”

2008-11-21
66TYPO

Sentence should not say everyone, but everything: “That was a bit of work but we’re done with everyone we have to do to add a new team to the list.”

2008-11-21
60ERROR

re: Simplest technical fix for “Can’t connect File’s Owner to Navigation Item” problem.

Two parts to this fix: (1) remove one sentence in section 3.11, and (2) perform that task two pages later in section 3.12.

(1) On page 60, the fifth paragraph of section 3.11 (starting with “Our AddTeamViewController…”), REMOVE the following sentence:

“Control click the File’s Owner to the “Navigation Item” and assign it to the File’s Owner’s navigationItem outlet."

As others have noted, this task cannot be performed until the class files have been created.

(2) Insert that sentence at the END of paragraph 2 in section 3.12. Now it will work well (after defining the class in Xcode and making File’s Owner set to AddTeamViewController.

Yay. :-)

2008-12-02
127ERROR

After typing “sqlite3 shopping.db” in terminal - the book says “This creates the shopping.db file if it doesn’t already exist.”

I don’t believe the file is actually created until something is written to the database (e.g. a table is created). Not a huge problem, but if someone happens to go looking for it after they execute the given command it’s not going to be there.

2008-12-16
83ERROR

You bring up attributes inspector in IB 3.1 with Command-1, not Command-Shift-1.

2008-11-21
84TYPO

You bring up connections inspector in IB 3.1 with Command-2, not Command-Shift-2.

2008-11-21
28TYPO

I believe it would be better to for “Open it and add some code that looks like this;” to have a colon (:) instead of a semicolon (;).

Also, to verify what another reader said, the “it’s” and “its” throughout the book are often interchanged.

The general rule is : when you want a contraction, “it’s = it is”, and any possessive (belonging to ‘it’) is “its”. It seems counter-intuitive, but I’ve never forgotten this rule since one of my high school keyboarding classes - an assignment where I mistakenly put an apostrophe on its caused an A to become a B-. Lesson learned. ;)

2008-11-21
35TYPO

The word in the section on Objective-C Properties should be “thorough” instead of “through”, as in “We don’t have space in this book to do a thorough explanation…”

2008-11-21
60ERROR

The reader is asked to link up the Navigation Item to the File’s Owner’s navigationItem outlet. This outlet isn’t available at this stage as the File’s Owner is set as a subclass of NSObject. We have to first create the AddTeamViewController class in InterfaceBuilder and set the File’s Owner to that. The whole task of adding and linking up the Navigation Item would be better grouped with the linking the other outlets on the next page.

2008-12-02
70ERROR

The code example for setting a nav item’s title seems to have a memory leak. Setting self.title should retain the NSString, which if created using alloc/init will already have a retain count of 1. You ideally want to autorelease or just use +stringWithFormat:

2009-01-15
29SUGGEST

In the second paragraph of section 2.2, the sentence “The first view has a UILabel that displays some text and a UIButton that brings up a modal view with a single text field that we can type a new value into” is confusing because the joined clause doesn’t mention the second view. This whole paragraph is somewhat unclear on a first read through.

2008-11-21
85TYPO

Under section 5.2 the first two paragraphs are repetitive with regard to the data being hard coded — “in a real world application…”

2008-11-21
85SUGGEST

The code in this section seems to need some help. The code snippet under 5.2 needs to be in the createData method and needs to set the dictionary objects back into the states property. The states property needs to get declared and synthesized somewhere. If you’re leaving this to the reader it might be good to at least mention it and give a hint to the object type to use.

2008-11-21
149ERROR

You talk about NSHost, getStreamsToHost:, inputStream:, and outputStream: not being supported on iphone, but I’ve been using this on iphone with no problems:

\tNSHost *host = [NSHost hostWithAddress:@“10.1.20.111”];
\t[NSStream getStreamsToHost:host port:5004 inputStream:nil outputStream:&outputStream];
\t[self openStreams];

2008-12-16
58TYPO

The .nib
will now appear in the Groups & Files section of you Xcode sidebar.

2008-11-21
21ERROR

The book says that by pressing the ‘option’ key when clicking XCode makes the list of symbols appears alphabetical. For me it didn’t work with the ‘option’ key, but instead pressing the ‘alt’ key worked for me. I downloaded XCode for iPhone yesterday.

2008-11-21
205TYPO

Second paragraph, last sentence, you have, “… down to the ”Tasks" section, where find a link …“. Missing the word :we: between ”where" and “find”.

2008-11-13
63SUGGEST

The use of “delegate” as an instance var is misleading. True delegates are not retained and their methods are described in a protocol and checked in runtime. Here we do not have a “classical” Delegate pattern. Much better will be to call it something like tableViewController

2008-11-21
26ERROR

In the second paragraph, second sentence, you refer to the (as yet) unwritten chap.tabcontrollers. Isn’t this a reference to Chapter 5, Tab Bar Controllers, which is written?

2008-11-21
60ERROR

The first complete paragraph of text says…

“Our AddTeamViewController views needs a title and a button to get back to the list of teams. Search for “Navigation Item” in the Inter face Builder library. Drag an instance into our AddTeamViewController Inspector window. Control click the File’s Owner to the “Navigation Item” and assign it to the File’s Owner’s navigationItem outlet."

This does not work for me. When I Control drag from the File’s Owner it does not allow me to drop on the newly added Navigation Item, or in fact to any of the items in the AddTeamViewController IB inspector window. If I right click on File’s Owner, there are no outlets or actions defined.

Perhaps you missed out some steps, like adding outlets and/or actions, assuming the reader would know to do them? I’m very new to iPhone development and frankly do not know how to fill in the steps that you might take for granted. However, when you specifically state “do this…” and it does not work, I get frustrated.

I am particularly frustrated at this because I’ve been trying for a long time to get a very simple iPhone app to do just this very simple task (slide in a new view controller to add an item to a table), and it just simply never works for me, even though you book and several other references all hint at the same thing. I’m obviously missing something so basic that no text ever describes it, but I do not know what it can be.

I’m using Xcode/IB 3.1.1. although I hope that it has not changed too much from the version you are using. What version of Xcode/IB are you using to validate your example code?

2008-12-02
62ERROR

In Figure 3.13, where does the AddTeamViewController File’s Owner Received Action “addTeam” come from? It is not mentioned anywhere prior to showing up here.

2008-12-02
67ERROR

The new version of Mail.app has a different way of deleting messages - checkboxes and a global delete button.

2009-01-15
44TYPO

”you’ll almost always have your UITableViewController play this roll“ - the word “roll” should be spelt “role”.

2008-11-21
89TYPO

“fiver or more” should be “five or more”

2008-11-21
75SUGGEST

Don’t mean to be so nit picky here but …

UITableViewCell *cell;
cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];

Can be condensed to…

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];

That is all! As always great job and please keep up the good work. You are all awesome :)

2009-01-15
85ERROR

If you only add the California data shown in the example you get a runtime error with an index out of bounds in the statesByPopulation and statesByArea methods when you create the NSRange range = NSMakeRange(0, 5) and then apply it to the collection which has only the one member.

2008-11-21
109SUGGEST

In the example application you use a UIView to create the textbox for create Directory. You don’t explain why or how this works. Some explanation would be wise.

2008-12-16
179OK

I bought your book first and after going over this chapter I thought it was a little weak. So I bought the Core animation book and the chapter in it is almost exactly the same as your chapter. Very disappointing.

2008-12-16
205TYPO

On the first paragraph of page 205 there is a line that reads:

“After that, another pair of buttons deter -
mines whether the search applies to all languages, or just Objective-C,
C, JavaScript, and C.”

It repeats C twice, perhaps you guys simply meant C.

2008-11-13
214TYPO

On page 214 there is a line that reads:

“At you could click the ”Continue" button to plow ahead and crash"

That first part doesnt make any sense.

2008-11-13
23ERROR

In the code samples (specifically I’m looking at the FilesystemExplorer one), in the “Build” section of the “Get Info” dialog box, The code signing identity is set to “iPhone Developer:Chris Adamson” instead of just “iPhone Developer” (like BundlePrefereableClock does). That means that people are going to have to make changes in a piece of the XCode UI that the book doesn’t really talk about in order to be able to run the app on their device.

2008-12-16
16SUGGEST

For Me the overview menu is by default. But the active target is not

2008-12-16
32TYPO

Paragraph at bottom of page: “When you mouse up you should see a list of items titled ’Events’ select
the edit action.” should be broken into two sentences.

2008-11-21
34SUGGEST

Change sentence (near bottom of page) “We will discuss the methods in this protocol in a moment, for now know…” to “We will discuss the methods in this protocol in a moment, but for now, know…”

2008-11-21
37SUGGEST

sentence construction : “Control drag from the text field to the files owner object, when you release select the delegate…” might be “Control drag from the text field to the files owner object. When you release, select the delegate…”

2008-11-21
102SUGGEST

I think the File I/O chapter is, by far, the most confusing chapter in the book. I’ve gone through the previous chapters and found them illuminating but I’ve found this chapter to be particularly challenging. It wouldn’t hurt to go through the example application a bit more slowly just like the other chapters. There’s a lot to learn that’s very useful here and I was looking forward to it but it hasn’t been as instructive as the other chapters.

2008-12-16
89TYPO

Under 5.3, reminder should read remainder.

2008-11-21
34OK

Incredibly minor: The sidebar entitled “Target/Action Paradigm” should come after the code sample. As currently laid out, the @end tag from the “EditorViewController.h” sample isn’t readily visible and could be the source of a typo by someone who is either cutting and pasting the code directly, or just following along exactly with each example.

2008-12-16
60TYPO

“When propmted…” s/b “When prompted..”.

2008-11-21
50TYPO

In the first paragraph of section 3.7:

I believe “and just set the title property to the team name” should be “and just set the text property to the team name”

2008-11-21
52TYPO

Last paragraph on the page:

“Our text view’s rows” should be “Our table view’s row”

Also, I’m using the latest Xcode from the 2.1 SDK and this built the project fine. Perhaps this latest SDK doesn’t have the problem with the rows not filling the entire space? My build at this point does not look like Figure 3.4. When I look in the nib all four margins are set, not just the top & left.

2008-11-21
77SUGGEST

My iPhone is on O2 in Ireland, and we don’t have Visual Voicemail here, so the example quoted in the foonote doesn’t work for me. Hitting the Voicemail tab just dials the Voicemail number here,

2009-01-15
63ERROR

Missing an @import “AddTeamViewController.h” in RootViewController.m before adding the method (void)addButtonWasPresse. Otherwise AddTeamViewController would be undeclared.

2008-11-21
208TYPO

In the second to last paragraph, only sentence, you have, “This sends the String Hello iPhone to stout, …”. “stout” should be “stdout”.

2009-01-16
14TYPO

“reorganize to your hearts
content.” should be “reorganize to your heart’s
content.”

2008-12-16
16TYPO

third paragraph: “(completion, refactoring etc).” should be “(completion, refactoring, etc.).”

2008-12-16
61TYPO

In the paragraph beginning ‘Our AddTeamViewController…’ you can not ‘Control click the File’s Owner to the “Navigation Item”…’ until you have created the controller class in XCode and set File’s Owner type to the controller type. Nothing happens when you control click.

2008-12-02
74SUGGEST

Section 4.7 seems out of place to me, wouldn’t it be better to do handle it in chapter 3 along with the rest of the table view stuff?
I feel it kind of distracts from the navigation stuff handled in chapter 4…

2009-01-15
45TYPO

in section 3.2, first paragraph, last line: “reordoring of rows” should be “reordering of rows”.

2008-11-21
45TYPO

“play this roll” should be “play this role”.

2008-11-21
45SUGGEST

“Though you could set any object to serve as a table view’s data source, you’ll almost always have your UITableViewController play this roll.”

Doesn’t this violate the MVC design pattern? Isn’t the Model supposed to define the data source? And shouldn’t you keep the Model and the Controller separate?

2008-12-02
14OK

The text says that Xcode News [RSS] can be used to keep up to date with announcements about things like new sample code, but that section of the UI seems to be no longer updated. The RSS feed shows items up until June, and it is now November.

2008-12-16
86SUGGEST

The second paragraph of section 5.2 is just a repetition of what was already set in the first one. I would suggest to use only one of those:

The data for this example is hard coded in the application delegate. In a real world application you’d build out a set of model classes to represent your data and then store that data in a database or file (I prefer a database). For this simple example though we will just use NSDictionary objects to hold the data.

The first thing we need to do for our example is to create the data. In real world applications you would develop a set of model classes that would contain the data and then persist their information into either a database or file. In our case we are going to keep it simple and just use NSDictionary and hard code the data. Here is the code for the California data;

2008-12-16
84TYPO

Missing opening bracket in sentence:

You can see a screen shot here Figure 5.3, on page 91).

2008-12-16
90TYPO

Repeated use of ‘lets’ without an apostrophe.

2008-12-16
92TYPO

Last paragraph, middle of the second sentence reads: “….. the tab controller places the first for and replaces whatever would have been in the fifth place…..”. Should read “… the first four …..” I think.

2008-12-16
67TYPO

First paragraph line 4:
“an array of NSIndexPaths we us NSArray’s arrayWithObject: ”

Replace “us” with “use”.

2008-11-21
67TYPO

Second paragraph, first line:
“That was a bit of work but we’re done with everyone we have to do”

Replace “everyone” with “everything”.

2008-11-21
59ERROR

Section 3.11 onwards describes how to create a .xib file from scratch, and later hook it up to a controller class.

I wasn’t able to follow the text in this direction. But if I create the controller class first, and then the xib file, I was able to hook everything up correctly (i.e. add navigation item, place the hook from the file’s owner to the nav. item, set the view as the “view” on the file’s owner etc.).

So the section describing the creation of the controller class should be before the creation of the xib.

2008-12-02
51ERROR

“just set the title property to the team name”

should be “text” property

2008-11-21
40SUGGEST

While this shows an example of a modal view, the question I was left with was “Is this how I link all views from a button?” In other words- I’ve seen Apple examples about addSubView- how does that differ from modal? Why would I choose model over the addSubView? It would be great if this section could provide a bit more meat around the differences here, or at least an explanation as to why one would want to use the modal view approach.

2008-12-16
47TYPO

The word ‘hierarchy’ is mispelled in the ‘Joe asks’-section: “heirarchies”, “hieirarchy”, “heirarchical”

2008-11-21
52TYPO

Typo with the word ‘implementation’ at the end of the page:

“The default implemtentation returns YES, in other words responds
to the rotation event,…”

2008-11-21
53SUGGEST

Page 53/54: Didn’t get the ‘broken’ TableView after the rotation even though I hadn’t made the suggested changes in Interface Builder yet. The default autosizing settings for the TableView now seem to include these changes.

2008-11-21
61TYPO

Typo in the word ‘prompted’ (lower part of the page):

“In Xcode select FileNew File… (or Command N ). When propmted choose
a UIViewController subclass that we’re going to call AddTeamViewCon-
troller.”

2008-11-21
63TYPO

Between “passing in” and “the AddTeamViewController” there is a tiny little dot that shouldn’t be there:

"We switch to our team adding view by calling pushViewCon-
troller:animated: on our navigationController, passing in. the AddTeamView-
Controller.

2008-11-21
64TYPO

Right in the middle of the page:

“We want to be able to pass control over to the AddTeamViewController
now. This will happen with the Add button is pressed. Add the following
code to addButtonWasPressed.”

Should be: ‘(…)This will happen when/if the Add button is pressed.(…)’

2008-11-21
86SUGGEST

Redundancy at the beginning of 5.2:

“In a real world application you’d build out a set
of model classes to represent your data and then store that data in a
database or file (I prefer a database). For this simple example though
we will just use NSDictionar y objects to hold the data.”

… and just one line later:

“In real world applications you would develop a set of model classes that
would contain the data and then persist their infor mation into either a
database or file. In our case we are going to keep it simple and just use
NSDictionar y and hard code the data.”

2008-12-16
144OK

Since the web is getting more RESTful, it would be wonderful to have some ideas on the best way to fetch/parse data sets from the web. Example, I want to RESTfully fetch arrays of hashes from a database. Should I use several CSV calls, or try to parse JSON/XML? Any best practice on how to map those data points into ObjC structures, or even shove it into a SQLite DB first, and fetch the results as objects? Thanks!

2009-01-16
33SUGGEST

For now you
have just written the inter face—for now that’s all you need

Double ‘for now’ looks bad.

2008-12-16
72TYPO

Third paragraph ends “Next we’ll create the interface for this table view controller.” This sentence should come after the following code as I initially thought the following code was creating the interface, whereas it is in fact the code to add the variable ‘team’.

2009-01-15
90TYPO

“the tab controller displays a navigation controller that lists the reminder of the controllers along with”

is ‘reminder’ supposed to be ‘remainder’? Either way it might be an awkward sentence.

2008-12-16
93TYPO

“The cool this about this” likely meant to be “The cool thing about this”

2008-12-16
28 30ERROR

In Chapter two section 2.1 Your First View Controller, some of the steps to create a move me button application are missing or wrong. first you can not connect Button Click action to file owner until you declare the event action in view controller.h file , first you have to declare and define the action receiver method in view controller files (.h and .m) then you just simply chose the event like TabDown and drag it to the file Owner object . please check the code and the steps .

2008-12-16
66TYPO

* Change delcartion to declaration in the following paragraph.

addTeamNamed: is going to take one argument of type NSString. With the delcartion added, RootViewController.h will, in its finished state, look like this:

2008-11-21
205TYPO

sentence beginning: “If you are providing more granular infor mation like how far your use rode her bike then the location updates can be more like 100 meters.” should perhaps be: “If you are providing more granular information like how far your user rode her bike, then the location updates can be more like 100 meters.”

2008-12-16
76TYPO

Top of the page, middle of first paragraph: implmentation (missing an ‘e’)

2009-01-15
81ERROR

You alloc an object (UIBarButtonItem), you have to clean it up. This is a memory leak. Please add autorelease or flesh out the code by adding a variable and releasing it after.

2009-01-15
57ERROR

Bottom of this page, continued to page 58:

You alloc an object (UIBarButtonItem), you have to clean it up. This is a memory leak. Please add autorelease or flesh out the code by adding a variable and releasing it after.

2008-12-16
101ERROR

if-statement at the bottom of the page is unnecessary .

if (directoryContents != nil)

To quote Aaron Hillegass in his book Cocoa Programming For Mac OS X, 3rd Ed.:

“In Objective-C, it is okay to send a message to nil. The message is simply discarded, which eliminates the need for these sorts of checks.”

2008-12-16
49SUGGEST

Why override the initializer when Apple has provided us with:

- (void)awakeFromNib

which is called on every object as it is reconstructed from the nib file. Both ways work, but your point is “Because it’s loaded from a nib file…” so I think it’s best if you use “awakeFromNib” which is designed for this situation.

Please explain the long-term goals of using the initWithCoder because I think you might have some in mind. (serialization or the ability to programmatically initialize).

2009-01-16
56SUGGEST

Apple’s documentation in the TableView Programming Guide removes the data from the array before deleting the row. Done this way, there is no need for [tableView beginUpdates] and [tableView endUpdates].

Perhaps this is just the safest route to take for teaching people new to the platform? Maybe you could put in a word about these wrapper calls, explaining why they might or might not be used?

2008-12-03
88SUGGEST

Don’t use valueForKey: unless you want to get into key-value coding or talk about it in text and link to Apple’s Documentation.

2009-01-15
61ERROR

The errors people are focusing on here can be easily corrected if y’all add an extra step on page 61. Just say to set file’s owner (for AddTeamViewController.xib) to RootViewController et voilla! — instant access to that handy (inherited) navigationItem outlet.

2008-12-03
61ERROR

Never mind my previous post. I read a bit farther and I think I see where you guys are going with this. You guys are missing some key steps just about here. :)

2008-12-03
102SUGGEST

Why does your example declare a directoryTableView when it’s a subclass of UITableViewController which has an IBOutlet called tableView which is what Apple’s template Navigation-based project uses in IB?

2009-01-15
103SUGGEST

Can you make it a little clearer that the accessoryButtonTapped… hook is only valid if you are using the UITableViewCellAccessoryDetailDisclosureButton? If a reader experiments and decides they prefer the UITableViewCellAccessoryDisclosureIndicator as it’s more commonly used in Apple’s apps, suddenly that hook never gets called and they will be confused. I think just clarify why you chose to use a button and this hook (As it’s obviously the only option unless you handle multitouch events)

2008-12-16
103ERROR

Release that directoryViewController after pushing it on the navigation controller. Memory leak.

2008-12-03
104ERROR

Release that fileOverviewViewController after pushing it on the Navigation. Memory leak.

2008-12-03
106TYPO

The code is presented two times in a row.

2008-12-03
106SUGGEST

Please tell the user that they need to call updateFileOverview in viewDidLoad. I spent an hour wondering why my UILabels were NULL and not showing my text until, while looking through your code, I realized we are setting the variables before the view has even been loaded.

2008-12-16
185SUGGEST

The Multi Touch example relies on some Quartz API objects and calls to resize the image. I’d like to see more about what Quartz is and how to do image manipulation with it. For seasoned Mac OS X developers, this may be trivial, but for someone like me with previous mobile development experience, but no Mac experience, this part of the example is “magic”.

2008-12-16
206TYPO

“If on the other hand your application won’t work with the location service turned on then the user might want the chance to turn it back on from your app.” Should be “…service tuned off then the user…”

2008-12-16
206TYPO

“When the system is determining the accuracy of it location fix it takes…” Should be “…its location fix, it takes…”

2008-12-16
207TYPO

“Even when two towers are in range the numbers can we off buy quite a bit.” Should be “Even when two towers are in range the numbers can off quite a bit.”

2008-12-16
210TYPO

“We take the absolute value because we count going forwards and backwards still traveling” should be “as”

2009-01-16
89ERROR

When creating the second NIB I had to set the View’s class to be UITableView otherwise I would get the following error:

* Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ’-[UITableViewController loadView] loaded the “ByAreaView” nib but didn’t get a UITableView.

This may be caused by another error in my code but the class change rectifies it.

2008-12-16
22SUGGEST

shouldAutorotateToInterfaceOrientation is not commented out now and contains one line of code already. Maybe the text should be more vague here.

2008-12-16
Ch. 2SUGGEST

All of the projects in Chapter 2 use the View-Based Application template which creates (Hello, Button, Starter)AppDelegate.h and .m, main.m, MainWindow.xib, and other files. The role and function of these files are never discussed. Please try to include a broader discussion so that we can understand the MVC framework that we are using and how these files fit into it. A diagram(s) would be great! It is a huge jump to go from Hello iPhone to view controllers without the context and understanding of the framework. It could be a separate chapter on its own.

2008-12-16
118SUGGEST

Is is possible to add information on how to access the iPhone’s phone number and carrier? This information would allow me to tailor my app to the user.

2009-03-23
152SUGGEST

the browser is useful, but it is not clear how to allow rotation. When I set shouldAutorotateToINterfaceOrientation to YES, the result doesn’t scale to the screen. I couldn’t find example that properly explain how to resize views to fit the orientation.

2009-03-23
235ERROR

Footnote: “Note, however, that Shark cannot profile applications that are running on the actual device.” Performance session from WWDC suggests Shark does run on the device. Double-check this.

2009-03-23
244SUGGEST

Would be nice to have material in the Instruments section on diagnosing over-freed objects (c.f., NSZombie)

2009-03-23
24SUGGEST

The first paragraph suggest selecting the Active SDK Device - iPhone OS 2.0. But this may not be correct depending on which OS you have on your device. So first, I think it should say to select the appropriate version that matches your device. Second, I think you might want to explain the SDK concept and how you might need to install new SDK’s to match your device. I know I got bizarre error messages before I knew to install the new SDK and selected the right version.

2008-12-16
23SUGGEST

Section 1.5 really glosses over the certificate and profiling process. I think you should cover it in detail. I am realizing now there are some best practices like using a .* for the app id which Apple does not explain well. I think you have an opportunity to make it clear and make your reader’s transition to iPhone development easier.

2008-12-16
203TYPO

Figure 13.1 - The text fields say “Longituide” and “Latituide”.

2009-03-24
61SUGGEST

“Text Traits” should actually be “Text Input Traits”

2008-12-16
1OK

I would love to see some exercises at the back of each chapter. It would make it palatable to CS professors (such as yours truly) considering adopting it as a textbook.

2008-12-16
35TYPO

In the Target Action Paradigm sub-section, the description of the third method signature in the last sentance should read something to the effect: “Finally you might need the last method signature if you are tracking a multi-touch gesture in your app.” The current phrasing is slightly difficult to understand.

2009-01-15
16TYPO

The “Build & Go” shortcut described in the 2nd-to-last paragraph is Command+Enter in Xcode 3.1, not Command-Option-Enter

2008-12-16
61SUGGEST

I found this confusing “Control click the File’s Owner to the “Navigation Item” and assign it to the File’s Owner’s navigationItem outlet." I think it should be expanded - something like "Control click the File Owner Icon to display it’s outlets. Drag the NavigationItem outlet to the the Navigation Item.

2008-12-16
71TYPO

pop it onto your navigation controller’s stack of view controllers using the navigation controller’s pushViewController:animated: method

—This should read “push it onto your navigation controller” as pop is used in the method to remove the view.

2009-01-15
71TYPO

pop it onto your navigation controller’s stack of view controllers using the navigation controller’s pushViewController:animated: method

—This should read “push it onto your navigation controller” as pop is used in the method to remove the view.

2009-01-15
201TYPO

Last word, first sentence on page reads “you”, should be “your”.

2008-12-16
73ERROR

Section 4.6 Pushing View Controller onto the stack does not indicate to add an import statement to the RootViewController. Running the code after completing 4.6 causes an error.

Need to add #import “PlayersTableViewController.h” to RootViewController.m

2009-01-15
139OK

The statement “dbFilePath = [documentFolderPath stringByAppendingPathComponent:
DATABASE_FILE_NAME];” returns a string without the “/” before teh database file name.

2008-12-16
69TYPO

The folowing files are missing AddPlayerTableViewController.h, AddPlayerTableViewController.m, AddPlayerTableViewController.xib, and BasketballTeamsWithPlayers iin the code/Navigation/BasketballTeamsWithPlayers project.

2009-01-15
60TYPO

About midway through paragraph four there is a sentence that reads “In fact, the table needs as many cells are there are visible (or partially visible) cells at any one time…” The are following cells should be as so that the sentence reads “In fact, the table needs as many cells as there are visible (or partially visible) cells at any one time…”

2008-12-16
61TYPO

Final paragraph of “Creating a Custom Table Cell Class” section says “In the implementation class, TeamCell.h”, this should be “TeamCell.m”

2008-12-16
60TYPO

“Better yet, IB is a tool that a professional graphic
designer could use, leaving the developer (that’s you) to conentrate on
the code.”

“conentrate” should be “concentrate”

2008-12-16
193ERROR

In the “Customizing Animations” section you are writing:
“Since we changed the center of the ball image to the bottom of the screen and the animation ends at the top of the screen we get the jump. The fix for that is discussed later in this chapter when we cover key frame animations in Section 12.3, Layers, on page 195.”
But I’m not able to find any fix in section 12.3.!

In general nice book! Always anxious to receive updates with new info!

Nice Greetings

Frank

2009-03-24
33OK

it says“you’ll see the action and the two outlets that you just added” but I can only see one outlet, the UILabel one.

2008-12-16
93TYPO

The paragraph before the last starts with “The same basic principals apply”. The word should be “principles”.

2008-12-16
36SUGGEST

There are question marks for where to find more about properties. Here’s a link to Apple’s site regarding properties: developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_1.html

What you could do is point to something like www.pragprog.com/titles/amiphd/links/properties and redirect to the above link as the link may change/move.

2009-01-15
40ERROR

The second code snippet has us setting the text field as the first responder in EditorViewController’s viewWillAppear: method. It doesn’t work as the author intends because viewWillAppear: is called before any animation of the view onto the screen. The correct method to give the text field keyboard focus as soon as the modal view appears is:

- (void)viewDidAppear: (BOOL)animated;

This method is called immediately after the view appears on the screen.

2008-12-16
61ERROR

Should the TeamCell.xib file be created in the Resources group instead of the Classes group as suggested?

2008-12-16
52SUGGEST

There’s nothing in the text that tells us where the code snippet in the middle of the page (the one that begins with self.addButtonItem = [[UIBarButtonItem alloc]…) is supposed to go.

Which method does that belong to? My initial guess would be in the RootViewController’s initWithCoder: method, but the text needs to make it clear.

2008-12-16
52ERROR

The middle code snippet on the page (the one that begins with self.addButtonItem = [[UIBarButtonItem alloc]…) has a memory leak. The call to [UIBarButtonItem alloc] returns an object whose retain count is 1. Assigning it to self.addButtonItem (which actually calls [RootViewController setAddButtonItem:]) increases the UIBarButtonItem’s retain count to 2.

You have to release the UIBarButtonItem in the same block of code to reduce its retain count back to 1 so that releasing it in the dealloc method lowers the retain count to 0 and frees its memory.

2008-12-16
63SUGGEST

I deviated a little bit as far as the colors and fonts were concerned in this chapter and i spent about an hour trying to figure out why the team name and record didn’t display but the division did.. I finally tracked the error down to enabling Bold in the font preferences. Maybe a note somewhere about not enabling bold in the font dialog window would be handy for other people who might try and use some different styles during this chapter..

2008-12-16
62ERROR

Chapter 3.12 omits that the File’s Owner object needs its class set to RootViewController (in this case), and the Table Cell itself needs its class set to TeamCell.

If you attempt to set File’s Owner to TeamCell, your program will crash with an exception when it tries to unarchive the TeamCell.xib file because loadNibNamed:owner:options will try to connect your table cell’s outlets to nonexistent variables in RootViewController (self).

Perhaps someone could infer that File’s Owner needed to be set to RootViewController based upon the usage of loadNibNamed:owner:options with owner:self, but I couldn’t. I spent quite some time figuring out where the exception was coming from.

However, I greatly appreciate chapter 3.12 as it taught me something I haven’t seen elsewhere yet!

2008-12-16
65ERROR

On line 13 of the code snippet on that page, the value of the assignment, the NSString, is not released after it is allocated. You should either manually release the string on the next line (which would mean you would need a local variable to hold it, or you could use an NSString class method that autoreleases the returned string for you like:

+ [NSString stringWithFormat:]

2008-12-16
39TYPO

When you release, select the degate outlet to make the connection.

Typo: delegate instead of degate

2008-12-16
43TYPO

That connection will allow the StarterViewCon-
troller can display the editor view controller when the edit button is hit.

Wording…

2008-12-16
40ERROR

- (void)viewWillAppear:(BOOL)flag {
[field becomeFirstResponder];
}

This doesn’t work for me. However

- (void)viewDidAppear:(BOOL)flag {
[field becomeFirstResponder];
}

makes the field become the first responder…

2008-12-16
201SUGGEST

As of B7.0, chapter 13 is a decent primer on CoreLocation. Having learned how to work with it from Apple’s docs and various forums, I found the information on how Core Location triangulates the iPhone’s current location to help deepen my understanding of the iPhone’s GPS hardware.

However, it would be great to have a section on the locationManager didFailWithError delegate method, and describe under what scenarios this delegate would be called, what to do when these scenarios occur, etc.

Also, I and other developers on various forums have noticed that the CLLocationManager does not send location updates as frequently as you would think. Specifically, the update interval does not seem to occur at the frequency that you would expect from setting the distanceFilter property.

For example, when I debug the example code on my device, I am only getting 1-2 location updates, regardless of the distance I walk, or what I set the distanceFilter property to. Yet Google Maps is somehow able to get updates at fairly frequent intervals. If you know why the CLLocationManager behaves this way, it would be great to elaborate on this in the book as well.

One minor gripe. The sample code in DistanceViewController.m has this method call on line 40:

[self.locationManager performSelector:@selector(startUpdatingLocation) withObject:nil afterDelay:60.0f];

I don’t see this overloaded method in Apple’s docs for v2.2 of the SDK - is this an undocumented API call?

Thanks, and keep up the good work!

2009-03-24
141SUGGEST

In the snippet on this page:

sqlite3 *db;
int dbrc; // database return code
dbrc = sqlite3_open ([dbPath UTF8String], &db);
if (dbrc) {
NSLog (@“couldn’t open db:”);
return;
}

Where does the variable dbPath come from in this code?

Is it supposed to be dbFilePath?

If that’s the case, it would also help to know how the variable is conveyed from the App Delegate scope to the View scope.

2008-12-16
141SUGGEST

“working with habits different than”

should be

“working with habits different from”

2008-12-16
51ERROR

This is pretty picky, but… the last paragraph of section 3.4 (Deleting rows) says that first you delete the row from the table view, then from the array, but the code actually does these steps in the opposite order.

2008-12-16
52SUGGEST

It’s not clear, or at least it wasn’t to me, that the code to call addButtonWasPressed goes in the initWithCoder method. I think it breaks up the flow too much when the reader has to go consult the sample code just to understand what’s going on.

2008-12-16
56TYPO

Second sentence- I think “collection of team” should be “collection of teams”.

2008-12-16
58OK

This is a general comment, but the spot that brought it to mind is the last bit of section 3.9.

The method viewDidLoad is shown in its entirety, even though the part that the previous paragraph refers to is only the middle line. I had to think about it to figure that out, and IMHO there is enough to think about in the content of the book without having to also think about the layout of the book.

Mainly the problem is that it’s not consistent - sometimes just the new lines are shown, other times the whole method is. My personal preference would be to always show the whole method with the new lines highlighted somehow so they stand out, but consistency is more important than which style you choose.

2008-12-16
59SUGGEST

You say “You should never do something with animation unless the
view that would be animated is the top most view.”. I agree, but I think the sentence needs a “, because…”. While it’s probably obvious to most readers, there are going to be some newbies who won’t get it.

2008-12-16
30SUGGEST

The chapter multiple view controller is very hard to understand. The process to use IB appears like a sort of “wodoo” during the connection between the views and other elements.

Maybe more explanations are needed.

Regards
Andrea Fanfani

2009-01-15
noneOK

Maybe a little appendix with the basics of objective-c will be a great addendum

2008-12-16
137TYPO

sqlite> insert into “shoppinglist” (item, price, groupid, dateadded)
…> values (“iPhone 3G”, “199”, 1, DATETIME ('NOW'));
…> go

should be:

sqlite> insert into “shoppinglist” (item, price, groupid, dateadded)
…> values (“iPhone 3G”, “199”, 1, DATETIME ('NOW'));
sqlite> go

2008-12-16
87ERROR

You don’t give the code to the “self.states” method in both the StatesAppDelegate code snippets. Someone may try building and running the code only to find an unrecognized selector “states” exception.

2008-12-16
46TYPO

In the last line of the paragraph immediately before the code for initWithCoder:, you have ,“… it doesn’t call or get called by other method in our view controller”. The word “method” should be plural.

2009-01-16
51TYPO

In the last paragraph before section 3.5, second sentence, you have, “We need to delete the row from table view …”. You need to insert the word “the” before “table”.

2008-12-16
92TYPO

The last sentence in the 2nd to last paragraph reads: The code for that controller
is again very similar to the controllers from the previous example so I
won’t got into any more detail here." It should be “…so I won’t go into any more detail here.”

2008-12-16
53TYPO

In the last sentence on the page, you have, “… move it to the right edge it to fit …”. The word “it” after the word “edge” should be removed.

2008-12-16
55OK

In the paragraph after the image of control-dragging a connection to the text field, you talk about bringing up the list of outlets for the File’s Owner and selecting the navigationItem outlet. I can bring up the list of outlets but I can’t select the navigationItem outlet. I am not sure why I would want to do that even if I could since normally I would control-drag a connection from File’s Owner to the Navigation Item and just select the correct outlet.

In the next paragraph you talk about verifying that the outlets have been set up properly by control-clicking on File’s Owner. You only mention 2 of the 3 outlets that have been set. You should probably also mention the navigationItem outlet to avoid confusion.

2008-12-16
214SUGGEST

Please describe and show sample code for audio accessing, including sampling mic data and play audio through headset.
Please describe the audio drivers and library.

2009-03-23
60TYPO

In the fourth paragraph, fourth sentence, you have, “… start scrolling off the top of bottom of the table, …”. The word “of” between “top” and “bottom” should be “or”.

2008-12-16
185ERROR

The code in this example (demonstrating how to detect pinches) will lead to an NSRangeException in touchesMoved if run on a real device and one finger “escapes” off the screen during a pinch. It works fine in the simulator.

First few lines currently look like this:

- (void)touchesMoved:(NSSet )touches withEvent:(UIEvent)event {
if(YES == pinchZoom) {

Instead, I’d suggest this:

- (void)touchesMoved:(NSSet )touches withEvent:(UIEvent)event {
\tif(YES pinchZoom && event.allTouches.count 2) {

2008-12-16
64TYPO

In the last sentence on the page, you have, “… and an design for …”. The word “an” should be “a”.

2008-12-16
66SUGGEST

In the code for createNewTeamCellFromNib, shouldn’t you be using nil instead of NULL in all cases?

2008-12-16
66TYPO

In the last sentence on the page, you have, “… show in Figure 3.1, …”. The word “show” should be “shown”.

2008-12-16
73SUGGEST

The code for tableView:cellForRowAtIndexPath contains the code that was in there prior to changing the code for using a custom table view cell. It would be less confusing to use the newer code using the TeamCell class.

2009-01-15
78TYPO

In the first paragraph of the section “Adding a button with Interface Builder”, fourth sentence, you have, “… setting a dynamic attributes like …”. Either the word “a” should be removed or the word “attributes” should be singular.

2009-01-15
84TYPO

In the third paragraph, second sentence, you are missing a “(” before “Figure 5.3, on page 91)”.

2008-12-16
86SUGGEST

In section 5.2, you should probably mention that you need to add an instance variable for states and make it a property of the class StatesAppDelegate. It will make the code more understandable.

2008-12-16
88TYPO

At the bottom of the page, you refer to the Table Views chapter as being unwritten yet. Probably should remove that.

2008-12-16
89SUGGEST

In the third paragraph where you talk about adding the TableView to the view for the ByPopulationViewController, you should probably tell the user to delete the label and text that is already in the view before adding the TableView.

2008-12-16
37TYPO

‘expect’ should be ‘expected’

the user will be ‘expect’ to provide. (in the last sentence on this page.)

should be:

.. the user will be ‘expected’ to provide.

2008-12-16
115OK

The paper book will be different, but for a PDF book, it’s almost like HTML when I can click from the TOC to a section called 6.5 Writing Data to Files.

Since that’s the case, you may want to avoid assuming such a linear conversational tone.

Example: "As you might have guessed, the stream-writing subclass of NSStream is NSOutputStream, and its essential method is write:maxLength:.

I just clicked straight to this section from the TOC because I’m interested in learning how to store (save) data and thought ‘Writing Data to Files’ would help with that.

I haven’t read the text leading up to this bit and wouldn’t have “GUESSED” anything.

The book has a very conversational tone - which while pleasant.. seems like it could be isolated from the ACTION ITEMS.

IDEA: any page that has Xcode or IB To Do items should be put in a completely separated part of the page. Like a recipe. So you could flip from page to page and just do the tasks. The commentary, insight, and conversation could happen above.

2008-12-16
31SUGGEST

Parenthetical text can be distracting. This may only be to people who are auditory and hear the text as they read in their minds.

In the last paragraph on this page, you have three thoughts in parenthesis.

While we could continue in IB for a bit longer (using the same technique
we used in Section 2.1, Your First View Controller , on page 27 to infor m
IB of our intent to have an action method on the view controller) we will
instead jump over to Xcode and make the changes there (I war ned you
it would be a bit bumpy). The reasons for this are twofold, one so that
you can see firsthand the great way IB and Xcode are integrated (IB will
know about the changes as soon as we make them).

I love writing I only have to read once to understand. A paragraph like this.. that doesn’t even really forward my skills, is time wasting.

ALSO: shorter sentences are more digestible.

Sentences that cover 4+ lines can be edited for clarity:

While we could continue in IB for a bit longer (using the same technique
we used in Section 2.1, Your First View Controller , on page 27 to inform
IB of our intent to have an action method on the view controller) we will
instead jump over to Xcode and make the changes there (I warned you
it would be a bit bumpy).

That’s one sentence.

I’d rather read something like:

"At this point, we could continue in IB like we did with Your First View Controller, or jump over to Xcode. We are going to jump over to Xcode for two reasons: 1.) you’ll experience the tight integration between IB and Xcode, and 2.) you’ll get used to jumping between the two applications as iPhone developers use both tools simultaneously.

[You thought one editor was tedious enough. Now you have everybody giving their editorial opinion.]

A great example of very tight, clear language is found in Twyla Tharp’s book: The Creative Habit

2008-12-16
33TYPO

In the paragraph starting with: "The @class…

Right in the middle, you mention header includes (in parenthesis) while discussing ‘forward declarations’

The very next sentence begins with ’They are very messy…

In the flow, it feels like ‘They’ is talking about the subject of the previous sentence - i.e. ‘forward declarations’. But you’re saying header includes are messy. I think remove the parenthesis or swap "Header includes in for ‘they’

e.g. Header includes are very messy and you should avoid them.

2008-12-16
33SUGGEST

This text has lots of what seem to be run-on sentences. Where you put two complete thoughts together with a comma, ‘and’ or some other connector.

E.g.

They are very messy and you should avoid them, use the forward declaration
in your headers instead of including the other header.

These are two complete sentences connected with a comma after …should avoid them,

[Found in the paragraph that begins with “The @class compiler”]

2008-12-16
37TYPO

Throughout the book, all quotes are used incorrectly. When using LaTeX (as I expect you are) use the delimeters ` and ’ for single quotes and `` and ’’ (which is 2 apostrophes) to for double quotes. That way the quotation marks are the correct way round.

Example:
This is the `correct’ way of doing things.
``OK’’ he said.

2009-01-16
61TYPO

This sentence is inaccurate:

In the implementation class, TeamCell.h, all you need to do is to syn- thesize these properties at the top of the implementation block, and to
release them in dealloc, as usual.

2008-12-16
145TYPO

sqlite3 stores strings as UTF-8 (or UTF-16, if that’s what you supply… see the “SQLite Version 3 Overview” doc), so for retrieving values, initWithUTF8String: is more appropriate than initWithCString:. Thanks to reader Nickolay Nickolaev for reporting this in the forum.

2008-12-16
205TYPO

First paragraph, type: If you
are providing more granular infor mation like how far your use rode her
bike then the location updates can be more like 100 meters. should be If you
are providing more granular infor mation like how far your user rode her
bike then the location updates can be more like 100 meters.

2009-01-15
127TYPO

The book says icon.png must be added to Settings.bundle, but it does not say how that is accomplished

2009-01-15
102SUGGEST

In the code excerpt where you set the DirectoryViewController’s directoryPath, you implicitly use an instance variable named directoryViewController without mentioning that it is the application delegate’s navigation controller’s top view controller after the application launches. Further explanation about this would be helpful.

2009-01-15
60OK

In the last chapter: “A workable strategy” sounds not like this would be the apropriate way. I was surprised that this strategy was used.

2009-01-15
61TYPO

Designing a Custom Table Cell
The next thing we’ll do is to design a cell in IB, and to make that cell
an instance of the TeamCell class we just defined. Begin by clicking
on “Classes” in Groups & Files and choosing File->New File. This time,
you’ll choose Xcode’s “Empty XIB” template and call the file TeamCell.xib.

Shouldn’t that be “clicking on ”Ressources“”

2009-01-15
62SUGGEST

For clarity, rename this object from “Table View Cell” to “Team Cell”.

It took me a while to figure out that I can rename it unter Interface Builder Identity.

2009-01-15
93SUGGEST

Up until chapter 5, you have been using a tutorial style where you walk the reader through creating all the code. This chapter seems to change to a mixture of tutorial and talking about code you provide. If this is intentional, you might want to put something at the beginning of the chapter that lets the reader know that you are changing your approach.

Just a suggestion.

2009-01-15
62ERROR

On pp. 61, in “Designing a Custom Table Cell” the instructions say to create the TeamCell.xib in the “Classes” folder under Groups & Files, as opposed to under the Resources folder, where I’d expect.

“Begin by clicking on ”Classes" in Groups & Files and choosing File->New File. This time,
you’ll choose Xcode’s “Empty XIB” template and call the file TeamCell.xib. "

I think this is just an error, but if not then why this nib file goes into the Classes folder should be explained.

2009-01-16
16TYPO

“back and fourth” -> “back and forth”

2009-01-15
90ERROR

To get the By Area tab to work correctly, you need to disconnect the view in the area tab in IB so it then says Loaded From “ByAreaView.nib” otherwise the By Area tab displays the same view as the By Population tab. I didn’t see anything in the section explaining this.

2009-03-24
128TYPO

In the last paragraph, first sentence, you have, “… the PreferenceSpecifiers array is dictionary …”. You should have the word “a” before “dictionary”.

2009-01-15
146TYPO

In the second to last paragraph, last sentence, you have, “… method to return provide the UITableView …”. The word “return” should be removed.

2009-01-16
90TYPO

Is correct the code in beta-8 with
[[self.states objectAtIndex:indexPath.row] name];

In beta 7 and in the source is “valueForKey:@”name“”

2009-01-16
189TYPO

should be “by”

2009-01-15
192TYPO

should be “need to do get our newly”

2009-01-15
203TYPO

<photos is found the Contacts application.> should be "photos is found the Contacts application.

2009-01-15
43SUGGEST

Instead of “- (void)viewWillAppear:(BOOL)flag” you should use “- (void)viewWillAppear:(BOOL)animated”. “flag” is nondescript, while “animated” tells you immediatly what the argument is for.

2009-03-23
38SUGGEST

The “nonatomic” property seems unnecessary, and should probably be omitted, since it will only confuse a reader.

2009-01-15
122OK

MainViewController.h*, create
IBOutlets for UILabels called timeLabel and timeZoneLabel.

2009-01-15
189TYPO

First paragraph, third sentence: “In this chapter you will build custom user inter faces buy extend-
ing” -> “by extending”

2009-01-15
201TYPO

Section 11.5, third paragraph: Second sentence seems to be the aftermath of a collision between two sentences. “context for you can then”

2009-01-15
201TYPO

Last paragraph, first sentence: “setup” is not a verb. It should be “calculate or set up”.

2009-01-15
117TYPO

Missing colon in method name:

“You can also supply an NSData as the contents argument to the NSFileManagercreateFileAtPath:contents:attributes: method above.”

(should be NSFileManager:createFileAtPath:contents:attributes:)

2009-01-15
124TYPO

MainWindowController.h should be MainViewController.h

“In MainWindowController.h, create
IBOutlets for UILabels called timeLabel and timeZoneLabel.”

2009-01-15
171ERROR

Cannot compile MultiTap sample code downloaded from site. Fails with 1 error. I am using latest code. SDK 2.2 with XCode 3.1.2

2009-01-15
171TYPO

error is

Building target “MultiTap” of project “MultiTap” with configuration “Debug” — (1 error)
\t cd “/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap”
setenv PATH “/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote “/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/MultiTap.build/Debug-iphonesimulator/MultiTap.build/MultiTap-generated-files.hmap” “-I/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/MultiTap.build/Debug-iphonesimulator/MultiTap.build/MultiTap-own-target-headers.hmap” “-I/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/MultiTap.build/Debug-iphonesimulator/MultiTap.build/MultiTap-all-target-headers.hmap” -iquote “/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/MultiTap.build/Debug-iphonesimulator/MultiTap.build/MultiTap-project-headers.hmap” “-F/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/Debug-iphonesimulator” “-I/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/Debug-iphonesimulator/include” “-I/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/MultiTap.build/Debug-iphonesimulator/MultiTap.build/DerivedSources” -include /var/folders/uN/uN-y0p-QFj0gosJ5GyZPwU+TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/MultiTap_Prefix-hkxxgdvwcvnkvohkyohesplizltp/MultiTap_Prefix.pch -c “/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/Classes/../MultiTapView.m” -o “/Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/build/MultiTap.build/Debug-iphonesimulator/MultiTap.build/Objects-normal/i386/MultiTapView.o”
i686-apple-darwin9-gcc-4.0.1: /Users/neil/Documents/Projects/Scoreboard/iPhone SDK book/code/MultiTouch/MultiTap/Classes/../MultiTapView.m: No such file or directory
i686-apple-darwin9-gcc-4.0.1: warning: ‘-x objective-c’ after last input file has no effect
i686-apple-darwin9-gcc-4.0.1: no input files
\t\ti686-apple-darwin9-gcc-4.0.1: no input files
\t\ti686-apple-darwin9-gcc-4.0.1: no input files
\t\ti686-apple-darwin9-gcc-4.0.1: no input files
\t\ti686-apple-darwin9-gcc-4.0.1: no input files
Build failed (1 error)

2009-01-15
128TYPO

“The other thing to notice is how you can refer to a method by means of the @selector keyword, which gives you the selector type needed for the instanceMethodSignatureForSelector method.”

“instanceMethodSignatureForSelector” should be “methodSignatureForSelector”

2009-01-15
25OK

I’ve trouble with creating a provising profile with the documentation Apple supplies. Especially with the Identifier (e.g. is it possible to use wildcards here or should I register every identifier beforehand?). My suggestion is to expand the section »1.5 Running your app on your iPhone« a bit more and cover Apples developer portal where I’ve to create the profile etc. too.

2009-01-15
75SUGGEST

The code example from tableView:cellForRowAtIndexPath doesn’t include the changes made in section 3.12 “Designing Table Cells with Interface Builder,” so it breaks continuity for those going cover to cover. I would add createNewTeamCellFromNib etc.

2009-01-15
20OK

I’m using IB v3.1.2 (677), and when I drag the Label into the view window, no guides appear to snap to as referenced at the end of the third paragraph on this page. Further, once I drop the label onto the view, the background changes to diagonal gray stripes (which I didn’t expect) and I am not able to move the label with the mouse. Its blue handles appear, but I can’t drag the label to reposition it.

I was pretty careful to follow the instructions in the PDF exactly, so I think the text should be more explicit about how this task (moving the label into the view) is to be performed.

2009-01-16
20OK

Regarding the erratum I just entered: turns out the problem was that IB launched showing the View Controller window, not the Window window. The instructions should explicitly tell the reader to double-click the Window item in the MainWindow.xib window and use that as the target for the drag operation.

2009-01-15
63TYPO

“Begin by clicking on ”Classes" in Groups & Files and choosing FileNew File. This time, you’ll choose Xcode’s “Empty XIB” template and call the file TeamCell.xib." surely this should be the Resources group not Classes?

2009-01-15
75TYPO

The last paragraph should read:

“This is our first peek at pushViewController:animated: ” - the 5th word should be P-E-E-K.

2009-01-15
135TYPO

The last sentence on the page reads: “So when you test your preference
handling, you’ll want to be sure to sure that you stay…” You have an extraneous “sure to” in there.

2009-01-15
148TYPO

In the middle of the first paragraph, you say to use an NSNumberFormatter to format the date strings you get back from SQLite. It should be NSDateFormatter instead.

2009-01-16
148TYPO

The last sentence on the page reads:

“The view controller uses this array in its tableView:cellForRowAtIndexPath:( ) method to return provide the UITableView…”

It should read:

“The view controller uses this array in its tableView:cellForRowAtIndexPath: method to provide the UITableView…”

In other words, remove the parentheses (since Objective-C methods don’t use them) and remove the word “return”.

2009-01-15
31ERROR

I failed to follow your directions for connecting the button to buttonClicked: I’m not clear on what to hold and when to release.

I found the following to work for me: click File’s Owner, Apple+2 to get to the connections inspector, drag the nub next to buttonClicked: to the button, then select Touch Up Inside.

Your way seems like it’d be easier… except I don’t understand it.

Thanks!

2009-01-15
21ERROR

In order for the Struts & Springs configuration referred to on P21 and illustrated on P22 to work, the Label needs to be set-up with text alignment centered, otherwise the label text sticks to the left side when the label is rotated

2009-01-15
43OK

In the second code snippet on this page the if statement starts with:

if(nil != editorViewController.field.text &&…

This ‘reads’ (in my head) as “if nil is not equal to field’s text contents and…”.

I’d suggest reversing this clause to be:

if(editorViewController.field.text != nil &&…

So it then ‘reads’ as “if field’s text contents is not equal to nil and…”. That wording seems to flow better/be more readable (IMO).

2009-01-16
239ERROR

“UIInterfaceOrientationLandscapeLeft, or UIInterfaceOrienta-
tionLandscapeLeft).” - should be “or UIInterfaceOrienta-
tionLandscapeRight”?

2009-01-16
56ERROR

While working through the example on the SDK 3.1.2, I was unable to add a NavigationItem directly to the view as indicated by the text. The tool seems to require that a NavigationBar is in place first.

2009-01-30
53SUGGEST

I noticed a couple of differences between your download code/snippet and the sample implementation of tableView:commitEditingStyle:forRowAtIndexPath: that I’m seeing generated by the iPhone 2.2 SDK.

I’m not certain if the sample implementation has changed with 2.2 or if you just made a couple of changes not listed in the paragraph following the snippet. Anyway, here’s the sample implementation I see with the 2.2 iPhone SDK;

// Override to support editing the table view.
- (void)tableView:(UITableView )tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath)indexPath {

if (editingStyle UITableViewCellEditingStyleDelete) { // Delete the row from the data source [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; } else if (editingStyle UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}

The unmentioned differences I picked out are;
1. [tableView deleteRowsAtIndexPaths:withRowAnimation:] is passed YES instead of UITableViewRowAnimationFade in the 2.2 sample
2. if (editingStyle == UITableViewCellEditingStyleInsert) is ‘else if’ in the 2.2 sample

2009-06-16
55SUGGEST

Somewhere between page 55 and page 58 the declaration of addButtonWasPressed in RootViewController.m has changed from:

- (void)addButtonWasPressed…

to:

- (IBAction)addButtonWasPressed…

Syntactically I believe they’re essentially the same (since the .h declaration is already flagging this as an action for IB’s benefit) but I’d suggest that the .m declaration remains as one or the other return type throughout to save people wondering why it changed (or not noticing it changed). Especially since page 58 says “…then add the following code to addButtonWasPressed” (e.g. inside the existing (void) declaration set up on page 55).

Previous convention (pages 32 and 35/43) suggest that this should be IBAction in both .h and .m to remain consistent.

2009-01-16
66TYPO

“Click the ”Team Cell" in the document window and go to the Identity Inspector (D4) and set the class to TeamCell."

You were already told to do this at the top of page 64.

2009-01-15
231TYPO

Paragraph 1, underneath the inset, “use” is clearly the wrong word: “If you are providing more granular information like how far your use rode her bike…”.

2009-01-16
228TYPO

In paragraph on we are instructed to add the Core Location framework to our project, but the location of the framework isn’t wrapped and thus impossible to discern.

2009-03-24
229TYPO

“Longitude” is misspelled in Figure 15.1: Location Coordinates.

2009-03-24
229TYPO

Latitude is also misspelled in Figure 15.1.

2009-03-24
163TYPO

“ihpone-test-dir.conf would be a good choice.”

should be: iphone-test-dir.conf

2009-01-15
33ERROR

" There are three ways to view the list of items, you can look at just the icons, which is the way most experienced …"

That’s multiple sentences. A period would help somewhere in there…

2009-01-15
88SUGGEST

§5.2 perhaps too much familiarity is assumed with Cocoa data classes at this point. Without looking at companion source I’d little idea that the correct thing to do once constructing the data was to write self.states = [NSArray arrayWithArray:data];

At least a note saying that from here on you need to be using the companion source would be good.

2009-03-24
187TYPO

“Once the zoom factor is calculate …”

should be: calculated

2009-01-15
92ERROR

You omit to point out that both the class of the File’s Owner in the ByAreaView.xib AND the second tab controller view in MainWindowView.xib should be ByAreaView. Also you omit to say that the delegate outlet of the UITableView in ByAreaView.xib should be the File’s Owner.

(Disclaimer: I know little about Cocoa, but I seemed to need to do these things in order to get the example to work.)

2009-03-24
198TYPO

“Don’t let he volume of code throw you off though.”

“he” should be “the”

2009-01-15
145ERROR

Formatting the SQL statement with initWithFormat as shown leaves the application vulnerable to SQL injection attacks, and at the very least simple breakages such as quote characters in the shopping item name.

2009-01-16
207TYPO

“…calculate the appropriate ratio to preserve
the aspect ratio (as seen on line ).”

missing line number

2009-01-15
207TYPO

The sample code (in the book and downloadable archive) specifies a “normal” alpha value (1.0) with a blend mode of kCGBlendModeDifference whereas the text refers to the code specifying a different alpha (0.75) and a normal blend mode (kCGBlendModeNormal).

2009-03-24
211TYPO

“our code responds buy bringing up the image picker.”

“buy” should be “by”

2009-01-16
137OK

There’s currently no coverage of UISeachBar. Would dovetail nicely with the sqlite chapter methinks.

2009-07-02We ended up mentioning the UISearchBar in passing in the "iPod Library Access" chapter, as part of the "search bar and search display controller" provided by IB in iPhone SDK 3.0.
219TYPO

“This code will set the duration of any animation for the view wether or not…”

wether should be whether

2009-03-24
35OK

Page 35 in the source code snippet incorrectly states

@class EditorViewController;

rather than StartViewController

2009-01-15
233TYPO

“Even when two towers are in range the numbers can be of f buy quite a bit.”

“buy” should be “by”

2009-01-16
68TYPO

Here’s a simpler of coding the TeamCell-finding loop:

\tNSObject* nibItem;
\twhile (!(nibItem = [nibEnumerator nextObject])) {
\t\tif ([nibItem isKindOfClass:[TeamCell class]])
\t\t\treturn (TeamCell*)nibItem;
\t}
\treturn nil;

2009-01-15
262TYPO

“The table in the upper portion of the window show the search results.”

“show” should be “shows” or there’s a missing “will” etc.

2009-01-16
8SUGGEST

Can we have a chapter on testing please? I looked this up in the forums, and getting unit tests for the iPhone seems rather non-trivial.

Given that this is a Pragmatic book, it feels really wrong that testing isn’t covered.

Thanks!

2009-01-15
Ch 2SUGGEST

I am trying very hard to make the example in chapter 2 work, and am giving up with almost no understanding of how a modal view controller works, or any real idea of where to look for that information.
I admit I am somewhat new to Cocoa dev and Iphone which is why I purchased this book to use it as a framework to dig into the whole process.
I think when I started it was more of an Alpha not a Beta and now at B8.0 I think the early sections require a lot of work, lots of question marks referring to other sources of information etc.
I also think chapter 2 is broken unless you already know how to finish the task itself, the addition of the view controller is not clear specifically the following:
“For the final step, connect the editorViewController
outlet of the File’s Owner object to the new view controller. To do
that, control click on the File’s Owner and drag to the new view controller.
When you let up on the mouse a pop-up window will list the
editorViewController outlet, select it.”
I don’t get anything like this when I try that operation and I have recreated the project at least twice because I would like to understand this whole concept because it is important…..
I give up, and reluctantly move forward hoping to have a better experience.

2009-01-15
86TYPO

So, after a chapter dealing US basketball teams, we’re now working with US states? Couldn’t this be a little less US-centric?

2009-01-15
127TYPO

In the code sample starting on page 127 and continuing on page 128 (with a link to the full sample [FileIO/FlippingPreferableClock/Classes/MainViewController.m] on page 127) the variable clockViewUpdateTimer is never declared.

In my own code, I can declare it as an NSTimer *, but then I get a warning saying that the variable is never used. What is the purpose of that line in the sample?

The sample code should just make sense, and if it doesn’t appear to, such instances should be explained.

2009-01-15
68SUGGEST

Sorry I typed enter too soon earlier. This is code that does exactly what the old one did:

\tNSObject* nibItem;
\twhile ((nibItem = [nibEnumerator nextObject])) {
\t\tif (![nibItem isKindOfClass:[TeamCell class]])
\t\t\tcontinue;
\t\tTeamCell* teamCell = (TeamCell*)nibItem;
\t\tif ([teamCell.reuseIdentifier isEqualToString: @“Team”])
\t\t\treturn teamCell;
\t}
\treturn nil;

2009-01-15
73SUGGEST

Regarding the stuff under “the back button” — we have already implemented this in section 3.8 pages 58/59. It would’ve been nice to have all this explanation then, or at the very least have a forward reference there.

Thanks!

2009-01-15
55SUGGEST

How about making the + button add a random team. This would eliminate the need for a 2nd view. The point is chapter 3 would actually be about table views, and then chapter 4 would introduce having multiple views and navigating between them.

Thanks!

2009-06-16
33TYPO

Five of the nine occurrences of “the users” in this PDF should actually be “the user’s” (possessive). These five occurrences are on pages 33, 179 (two), 207, and 233.

2009-01-15
83TYPO

sec.deletingRows looks like it’s section 3.4 Deleting Rows?

2009-01-15
88OK

It seems to me that the companion source for this leaks the mutable array. I think -createData should have a [data release]; after the line with self.states = …

Thanks for the book.

2009-01-15
38SUGGEST

At the bottom of this page (and in your gray box up top) you say “For more details on both the property and protocols of Objective-C see the Apple docs [?]”. You were probably already planning on doing this but I would recommend pointing readers to Apple’s “The Objective-C 2.0 Programming Language” guide. It should provide the reader all the details they need to know about properties and protocols in the “Declared Properties” and “Protocols” section. HTH

2009-01-15
222TYPO

In the first paragraph below the viewDidLoad code sample, you say that blue layer’s zPosition is 100, when the code sample says it’s 5. Also the paragraph says the red layer’s zPosition is 0 when the code sample says it’s –5.

2009-03-24
63TYPO

Creating A Custom Table Cell Class

text reads:
So, in your Groups & Files, click on the “Resources” folder and select
File->New File. This time, the template you want is the “UITableViewCell
subclass”.

Should this be the Classes folder?

2009-01-15
58ERROR

“Our AddTeamViewController view needs a title and a button to get back to
the list of teams. Search for “Navigation Item” in the Interface Builder
library. Drag an instance into our AddTeamViewController document win-
dow. Then set the title of the Navigation Item to “Add Team” in the
attribute inspector.”

I think this needs a little clarification/cleanup. The way I read this paragraph it seems to suggest that the Navigation Item you’re adding is setting up both the ‘Teams’ button and the view title. Yes, it’s setting the title for the view but it doesn’t add the button. You can omit adding the navigation item to this view completely and, although the AddTeamViewController view will then be untitled, you’ll still get the navigation item.

I believe the ‘Teams’ item comes from MainWindow.xib -> Navigation Controller -> Root View Controller (Teams) -> Navigation Item (Teams).

If there was a third view called by AddTeamViewController then, I believe, the ‘Add Teams’ Navigation Item added comes into play (to display the navigation item that returns from the third view to the 2nd).

2009-01-30
229ERROR

In the second paragraph below the picture, it says to provide IBOutlets for the 2 labels so that we can update their text values with the latitude and longitude values. The outlets should be for the text fields not the labels.

2009-03-24
20SUGGEST

The second paragraph (outside of the “Joe Asks” box) says to open the HelloViewController.xib by double clicking on it. However, it doesn’t say where to find that file. I found it under the Resources folder, but it seems like it might be useful to suggest to people where to find it.

I’d also hyphenate “double clicking” but I don’t know that it’s vital. :)

2009-01-15
23TYPO

The book states that the shouldAutorotateToInterfaceOrientation method will be commented out, but in my version of Xcode and the SDK (Xcode 3.1, not sure how to check my iPhone SDK version if possible), the function looks like so (between the dashed lines):
———————————
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
\t// Return YES for supported orientations
\treturn (interfaceOrientation == UIInterfaceOrientationPortrait);
}
———————————

No comments whatsoever.

2009-01-15
39SUGGEST

The paragraph:
“Next we add the text field that the user will type into. From the Library
drag out a text field onto the view. Place it wherever you see fit. Then
connect the field outlet from the files owner to the newly placed UITextField.”

That last instruction to connect the field outlet from the file’s owner to the newly placed field wasn’t exactly clear. I’d say something like “Then, using a control-click on File’s Owner, drag up and connect the field outlet to the newly placed UITextField.” or something similar. If nothing else, the word “files” needs an apostrophe.

2009-01-16
240TYPO

In the discussion of accelerometer update frequency, it says the following:
“…you generally want to run closer to frame rate, so an interval of 0.33 (30 updates per second) or even 0.2 (50 updates per second) is appropriate”

The 0.33 and 0.2 are an order of magnitude off, aren’t they? I believe those would be 3 and 5 updates per second, with it actually wanting 0.03 or 0.033 for 30 FPS and 0.02 for 50 FPS.

2009-01-16
121ERROR

This whole sample doesn’t work if the clock is set to 24-hours in the System Setting. Verified on both iPhone OS 2.1 and 2.2.

2009-01-30
17TYPO

“fourth” should be “forth” in the sentence:

You will be switching back and fourth between pushing the applications we build to your iPhone and the simulator often.

2009-01-15
76ERROR

Don’t forget to #import “PlayersTableViewController.h” at the top of RootViewController.m to be able to run the code in section 4.6.

2009-01-15
100SUGGEST

“Applying this changes the source files, but not the RootViewController.xib file that contains the view.”

It isn’t clear here that we’re talking about the source files filenames. It’s not quite correct to say that the RootViewController.xib hasn’t been changed, as it has, just not it’s filename.

2009-01-15
110OK

You can eliminate the endOfStreamReached variable by using a while (1) and break statements.

2009-01-15
63ERROR

On pp. 63 the instructions say to create the TeamCell subclass in the “Resources” folder: “So, in your Groups & Files, click on the ”Resources" folder and select File->New File. This time, the template you want is the “UITableViewCell subclass”. Call the class TeamCell." That can’t be right.

2009-03-23
92SUGGEST

at the top of the page “then open the view by double clicking on it. Add a table view and …”

Following this led me to a situation where I had the table view contained in the original view. When I picked the By Area tab, the app blew up with an exception which I finally figured out by looking at the console:

2009-01-03 21:49:08.141 States[20087:20b] * Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘-[UITableViewController loadView] loaded the “ByAreaView” nib but didn’t get a UITableView.’

I deleted the original view in the xib, then added JUST the UITableView and connected its data source to the file’s owner, and the app worked!

2009-03-24
90TYPO

NSDictionary doesn’t respond to name, andrea fanfani is right,

cell.text = [[self.states objectAtIndex: indexPath.row] name];

needs to be:

cell.text = [[self.states objectAtIndex: indexPath.row] objectForKey: @“name”];

2009-01-16
233TYPO

“Even when two towers are in range the numbers can be off buy quite a bit.”

2009-01-16
99SUGGEST

The “Exploring Directories” section on this page isn’t clear - are you are discussing the design of the application that will be created in the following pages, do you expect the reader to create the application at that point or do you expect the user to download and view the sample program. (personally I agree with the first errata posting about “… a drastic turn at this point…”)

2009-03-25
73TYPO

Section 4.3, second paragraph
Please replace “then pop it onto” with “then push it onto”.

2009-01-16
105OK

Having code excerpts which don’t even indicate which method they are implementing, like the one on this page under “Getting File Attributes” makes following the discussion almost impossible, for me at least.

2009-01-15
113ERROR

I think that there is a memory leak in the stream:handleEvent: method.

bufferString seems to be being allocated but never released.

2009-01-15
77SUGGEST

Rather than assuming that enums will start with 0, it would be safer (and more readable) to assign the enum a value:

typedef enum {
PlayerPositionGuards=0,
PlayerPositionForwards=1,
PlayerPositionCenter=2
} PlayerPosition;

2009-06-16
78SUGGEST

Suggest you throw an exception for the unexpected “default” case of both switch statements. Right now they just return –1, which could make for difficult debugging later.

Perhaps:

default:
throw [NSException exceptionWithName:“InvalidCaseException” reason:[NSString stringWithFormat:"Invalid case: %", section] userInfo:nil];

2009-06-16
48TYPO

“since it doesn’t call or get called by other method in our view controller”

should be “…get called by any other method…”

2009-01-16
89TYPO

Run-on sentence that should be split into two sentences:

The two view controllers that we are going to build have essentially the same code they differ only by the method used to get the list of states they display.

2009-01-16
91TYPO

The following sentence is missing a period:

You should have something that looks like Figure 5.2, on
the previous page

2009-01-16
95TYPO

Run-on sentence:

Congratulations you have been through all the view controllers that come with Cocoa Touch.

2009-01-16
20SUGGEST

In the last paragraph on page 20 where you say to ‘save your changes and hit the Build and Go button’, it would be clearer for a beginner if you said something like ‘save your changes to the nib file in interface builder, switch to x-code, and then hit the Build and Go button’.

I think that it’s important to make it clear that they are two separate applications to somebody new to x-code.

2009-01-16
248TYPO

CGFloat lowPassFilteredX = (acceleration.x * kFilteringFactor) +
(filteredAccelX * (1.0 - kFilteringFactor));
is undeclared - should this be acceleration.x?

2009-01-16
104ERROR

This line of code does not work:

// populate the first view
directoryViewController.directoryPath = NSHomeDirectory();

unless you declare a DirectoryViewController field & property in FilesystemExplorerAppDelegate.h, synthesize it in FilesystemExplorerAppDelegate.m, and connect it in IB.

2009-01-15
41SUGGEST

Use gender-neutral language: e.g. instead of “… when the user has indicated that he is done editing the text.” better use “… when the user has indicated that they are done editing the text.” (BTW I’m working through the book and finding it very useful)

2009-01-16
90TYPO

cell.text = [[self.states objectAtIndex:indexPath.row] name];
should be
cell.text = [[self.states objectAtIndex:indexPath.row] objectForKey:@“name”];

2009-01-16
207ERROR

The code sample implements an Aspect Fit, not an Aspect Fill as stated.

2009-03-24
63TYPO

In the code snippet, you have IBOutlet on the iVars.

This will work, of course. But it is probably more correct to have the IBOutlet declaration on the properties themselves so that they behave correctly and use the retain or copy declarations of the properties, like:

@property (nonatomic, retain) IBOutlet UILabel* nameLabel;

Apple’s latest code samples are set up this way.

2009-03-23
68SUGGEST

This code sample uses NSEnumerator. Since Objective-C 2.0 is required for iPhone development, one can use the new for loop to enumerate through the nib content NSArray.

Also, is there any reason that NSObject* is used instead of id? (I know that they’re the same thing).

The example can be rewritten as:

- (TeamCell*) createNewTeamCellFromNib {
NSArray* nibContents = [[NSBundle mainBundle]
loadNibNamed:@“TeamCell” owner:self options:nil];
TeamCell* teamCell = nil;

for (id nibItem in nibContents) {
if ( [nibItem isKindOfClass: [TeamCell class]]) {
teamCell = (TeamCell*) nibItem;
if ([teamCell.reuseIdentifier isEqualToString: @“Team”])
break; // we have a winner
else
teamCell = nil;
}
}
return teamCell;
}

2009-03-23
68SUGGEST

Perhaps mention that a declaration: - (TeamCell*) createNewTeamCellFromNib; should be added to RootViewController.h

2009-03-23
60ERROR

In the code in 3.10, add an if-clause to control for empty entries being created if nothing is typed:
if (textField.text != nil && [textField.text length] > 0 ) {
\t[rootViewController addTeamNamed:textField.text];
}

(The if condition is taken from p.43 but incorporates suggestion to simplify syntax by Liam Jones)

2009-01-30
116ERROR

CH6.4 (… Deleting) - Error running under Sim OS 2.2

I seem to have stumbled on an incompatibility with the supplied deleteSelected: method code in the DirectoryViewController implementation.

All works fine in Simulator OS 2.1, but Simulator OS 2.2 gives the following…



.
.
.
2009-01-04 23:02:55.427 FilesystemExplorer[8689:20b] can delete file /Users/rob/Library/Application Support/iPhone Simulator/User/Applications/ED6A778E-C8CC-4A5C-80F8-A6FF602F702D/Documents
2009-01-04 23:02:55.429 FilesystemExplorer[8689:20b] deleting paths (
<NSIndexPath 0x542dc0> 2 indexes [0, 0]
)
2009-01-04 23:02:55.429 FilesystemExplorer[8689:20b] * Assertion failure in -[UITableView _endCellAnimations], /SourceCache/UIKit/UIKit-747.36.52/UITableView.m:679
2009-01-04 23:02:55.430 FilesystemExplorer[8689:20b] * Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update must be equal to the number of rows contained in that section before the update, plus or minus the number of rows added or removed from that section.’
.
.
.

Not managed to check on the iPhone itself so I don’t know if this is an OS 2.2 problem, or Simulator OS 2.2 problem.

2009-01-15
290SUGGEST

When you say that the iPhone SDK doesn’t have support for unit tests, I think it would be helpful to mention the work-around developed by Google.

I can’t paste links here, so google-search “iphone unit tests”. The first result should be GTM (Google Toolbox for Mac), which has a wiki page named “iPhoneUnitTesting.”

I’m using this in my project, and it works. It doesn’t “just work”… but at least I can sleep at night.

I filed a bug in radar asking for seamless unit testing, and it got marked as a dupe. Maybe if enough people bug them…

2009-03-25
287SUGGEST

I think you should recommend “scan-build xcodebuild clean build” instead of “scan-build xcodebuild”

I find this approach much more useful when I’m iteratively fixing the bugs that clang discovers.

Thank you for covering this tool! I wouldn’t have found it by myself, and it rocked my build!

2009-01-16
74SUGGEST

In the last paragraph of 4.4, for clarity, change “… go set File’s Owner to be PlayersTableViewController.” to "… go (to the Attributes inspector and) set File’s Owner’s Class to be PlayersTableViewController.

2009-01-16
84SUGGEST

In the 1st para it says: “To make the delete button work you just have to implement a few lines of code in your Table View Controller and you’re done.” It would be good here to see what those few lines of code are. I’ve deleted the IB steps and implemented: self.navigationItem.rightBarButtonItem = self.editButtonItem; in PlayersTableViewController.m and it all works fine. What would I have to code to get it all working if I were to go down the IB route?

2009-01-16
97SUGGEST

FilesystemExplorer violates Apple’s UI guidelines for the iPhone by maintaining selection state. Tapping a row should have an immediate action, rather than maintaining highlight and waiting for the “edit” button to be selected in anticipation of a delete. cf. blogs.oreilly.com/iphone/2009/01/thinking-about-table-selection.html for more. Should use row-swipe to delete, then save “edit” button for add file or directory.

2009-04-30
68TYPO

Hi Bill,

In -createNewTeamCellFromNib you iterate over the top-level objects of the nib file. Although this works, Apple recommends using IBOutlets to access objects in nib. In such a case I would connect the IBOutlet from the nib file’s owner and in -createNewTeamCellFromNib call -loadNibNamed:owner:options, the connection will be made and you can return the connected object.

You can then also raise an exception if the reuse identifier isn’t set, this is a programmer error that would never allow cells to be dequeued from the table.

Jon

2009-03-23
197ERROR

Line #28 of drawRect is a duplicate in BarGraphView.m

2009-03-24
276TYPO

ABRecordSetValue(person, kABPersonFirstNameProperty,
(CFStringRef)"Wonder", &amp;error); should be ABRecordSetValue(person, kABPersonFirstNameProperty, (CFStringRef)“Wonder”, &error);

2009-03-24
27SUGGEST

The Joe Asks box makes a reference to the ‘unwritten’ media play back chapter but the chapter (ch14) is already included in this verson

2009-01-22
26TYPO

Core Services lists “location awareness” twice.

2009-01-30
35TYPO

Near the bottom of the page, where it says “So, open SayHelloViewController.m”, I believe that it should say “So, open HelloUserViewController.m”

2009-01-22
28TYPO

Where it says, “With the project
opened in Xcode, you should have a window like the (as yet) unwritten
fig.helloiphone.helloproj.”, I believe that this should be replaced with a link to the helloiphone project as it is already written.

2009-01-30
36ERROR

for the life of me, I keep getting an error when I type in this code

-(void) sayHello: (id) sender {
\tNSString* userName = [self nameField].text;
\tNSString* helloMessage = [[NSString alloc] initWithFormat: "Hello %", userName];
\t[self helloLabel].text = helloMessage;
\t[helloMessage release];
}

on the top of the page.

2009-01-30
27TYPO

Repeated word “where” in last sentence in first paragraph.
"Like C, you also need to indicate where where the com-
piler can find other code you’re using, by importing the header file of
classes you refer to in your headers or implementation.

2009-01-30
36TYPO

Bullet point says “we get the label with [self helloLabel] and then get the text
that’s been typed into it.” Text is from nameField, not helloLabel. Also, ivar can be referenced as just “nameField” sted self.nameField or [self nameField].

2009-01-30
27TYPO

Last sentence. “a small, lightweight runtime to the runtime objects.” delete the beginning “a” to read “small, lightweight runtime to the runtime objects.”

2009-01-30
41TYPO

The second to last paragraph reads “…it uses the
interface header to declared that...". It should read "...it uses the interface header to declare that…”

2009-01-30
6-TYPO

middle of page: First lets look at the edit code.
should read: First let’s look at the edit code.

2009-01-30
62TYPO

Bottom of page:
reads: If so then the view controller loads that nib file passing it’s self in as the File’s Owner.
should read (I think): If so then the view controller loads that nib file passing self in as the File’s Owner.
Also “self” should probably be in a different type face.

2009-01-30
76SUGGEST

“…we’ll pass a reference to the current instance
of the RootViewController to the AddTeamViewController setting it as its
delegate.”
A bit of pronoun confusion here, where the text reads “it as its”, it is difficult to know which controller is the delegate of the other. Specificity is a good thing.

2009-06-16
40TYPO

section 2.5 begins with…

“The application delegate is an example of one of Cocoa’s most signifi-
cant design design patter ns: delegation. ”

(double “design”)

2009-01-30
36TYPO

Missing period on first bullet point: “later in the chapter”

2009-01-30
36SUGGEST

Per users above, I received “error: request for member ‘text’ in something not a structure or union” using the bracket self syntax. This worked however:

- (void) sayHello: (id) sender {
\tNSString* userName = nameField.text;
\tNSString* helloMessage =
\t[[NSString alloc] initWithFormat: "Hello %", userName];
\thelloLabel.text = helloMessage;
\t[helloMessage release];
}

2009-01-30
155OK

I am having difficulty with the sqlite section. There seems to be a star identifier used in the select commands, I cannot find this character and cannot seem to find a work around. If you could mention how to create that star character you use it would help those of us who do not know how to find it. -Thanks, JT.

2009-03-23
41ERROR

The code to dismiss the keyboard at the bottom of sayHello should be:
[nameField resignFirstResponder];

2009-01-30
36ERROR

pp36, code line 2 yields

HelloUserViewController.m:14: warning: ‘HelloUserViewController’ may not respond to ‘-nameField’
HelloUserViewController.m:14: (Messages without a matching method signature will be assumed to return ‘id’ and accept ‘…’ as arguments.)
HelloUserViewController.m:14: error: request for member ‘text’ in something not a structure or union

pp36, code line 5 yields

HelloUserViewController.m:17: warning: ‘HelloUserViewController’ may not respond to ‘-helloLabel’
HelloUserViewController.m:17: error: request for member ‘text’ in something not a structure or union

switching the contents of the header to look like so works, but this is cargo-culted from a later example and I don’t really understand what’s going on:

#import <UIKit/UIKit.h>

@interface HelloUserViewController : UIViewController {
\tUILabel *helloLabel;
\tUITextField *nameField;
}

- (IBAction) sayHello: (id) sender;

property (nonatomic, retain) IBOutlet UILabel *helloLabel; property (nonatomic, retain) IBOutlet UITextField *nameField;

@end

… you must also add @synthesize to the implementation:

synthesize helloLabel; synthesize nameField;

2009-01-30
28TYPO

In the last sentence before the bullet points start, “can” is repeated:

“…you can can examine the parts…”

2009-01-30
39SUGGEST

It’s unclear at what point in the text the diagram comes in. Is it part of the last paragraph at the bottom of 38 or the first paragraph on 39. It seems to float without any direct connection and currently adds little value. It should be tied in better.

2009-01-30
38SUGGEST

Assuming the diagram on 39 is describing the setup from the bottom paragraph of 38, it would be better to explain which one is the window, which is the app delegate, etc. Or maybe (for those of us new to XCode) just explain all the icons in the screenshot in one go.

2009-01-30
39SUGGEST

This summary is confusing at best. I feel like you are teaching me how laces are tied. Would an annotated class diagram/other diagram help? Maybe have thought bubbles that provide interesting detail (like object x loads from a different xib) overlay the diagram.

2009-01-30
40TYPO

“affect” not “effect” in “that effect the whole application occur”

2009-01-30
208TYPO

amiphd-b9_0.pdf, page 208:

“These kinds of functions are called convenience functions because that make some of our drawing easier.”

2009-03-24
31TYPO

it says “we’ll be able style” - I presume it means to say, “we’ll be able to style.”

2009-01-30
36TYPO

in the last paragraph:
“the string (an nobody can be, ”
‘an’ should read ‘and’
ie:
“the string (and nobody can be, ”

2009-01-30
40TYPO

Penultimate paragraph:

“but instead of describing how an existing class’
methods work, it describes when”

“methods work” should be “method works”

2009-01-30
96TYPO

3rd paragraph, 2nd bullet:
“Create a new nib file that will hole the UI for our new table view
controller”

hole -> hold?

2009-03-24
96ERROR

RootViewController.h source:
Shouldn’t the DVDCabinetController be declared as an IBOutlet like it is in the @property signature two line below?

2009-03-24
92SUGGEST

Unless there is a pressing need to save the half page of space it would take, I would strongly recommend you list the code added to tableView:numberOfRowsInSection: and tableView:cellForRowAtIndexPath: - it just makes following along easier and not dependent on immediate access to the website.

Also, you might mention setting the title to “Cases” in viewDidLoad

2009-03-24
36TYPO

[self nameField] and [self helloLabel] don’t seem to work, no getter is defined (or synthesized).

2009-01-30
56TYPO

>There are two new concepts here, first is the declaration that our class conforms to the UITextFieldDelegate protocol.

Actually protocols were introduced earlier as was UITextFieldDelegate. (P41)

2009-03-23
56TYPO

>Control-Clickong on the File’s Owner and dragging to the text field.

Clickong

2009-03-23
42SUGGEST

“we imagine you can figure this out” - This seems completely wrong in this book, and particularly in this chapter. After meticulously explaining the various steps, throwing this in there with no instructions, no reference, no hint, etc., is frustrating. People are reading this book to learn, being told they “should be able to figure this out” is off-putting.

2009-01-30
75TYPO

Attributes Inspector is Command 6 not Command 1

2009-03-23
106TYPO

Last paragraph:
“The only new bit here is the use of the method valueForKey:.”

Perhaps this should read “objectForKey:”? The code uses objectForKey and we used valueForKey back in Chapter 5.

As a side note, this is more of an Objective-C thing, but you might want to elaborate on the difference between objectForKey: and valueForKey: and when it makes a difference whether to use one or the other.

2009-03-24
70ERROR

“Error” might not be the correct word for this but it’s an inconsistency. In the “viewDidLoad” method, the first line shown is “[super viewDidLoad]”. But this line was not part of the default code from Xcode. Then on page 72 we add another line to this method and the initial ‘super’ line is gone.

I think either it should be kept in both places (pp 70 and 72) or removed from both places.

2009-06-16
36ERROR

Code does not compile for the HelloUser Project. I’ve made changes that do compile on my configuration of XCode but they are commented out below.

- (void) sayHello: (id) sender {
\t
NSString* userName = [self nameField].text;
\t// NSString* userName = nameField.text; //This Works
\tNSString* helloMessage = [[NSString alloc] initWithFormat: "Hello there %", userName];
\t[self helloLabel].text = helloMessage;
\t// helloLabel.text = helloMessage; //This Works
\t[helloMessage release];

2009-01-30
50ERROR

“Hold down the ^ key and click on the button. Keep the ^ key down and drag toward the File’s Owner object.”

Is the ‘^’ key supposed to be the “Ctrl” key? This is confusing. Later in the chapter you refer to the “Ctrl” click, or right-click with a 2 button mouse, and I’m able to achieve what you intended. However, I interpreted this as hold down the UP arrow key and click, all that did is move my button up. This is a bit confusing and should at least be consistent.

Oddly, when I cut and paste from the PDF in Preview, it interprets the printed “^” character as “C”.

2009-04-30
36ERROR

In the First Hello user Example, The code will not compile.
Missing Stuff:
Header File:
Missed to mention the use of @property after defining
the variables in the header.

Source File:
Must use @synthesize to make there variables avaliable in the controller
thanx

2009-01-30
92TYPO

In second to last para: “First lets…” -> “First let’s…” Missing apostrophe.

2009-03-24
121SUGGEST

Under ‘Getting File Attributes’, the reference to the callback accessoryButtonTappedForRowWithIndexPath: could instead be written as:

tableView:accessoryButtonTappedForRowWithIndexPath:

2009-01-30
85TYPO

>As you can see, the first part of this method is identical to the version you saw earlier, except for line 7…

Lines 4-5 are different as well, here we are creating a pointer to a TeamCell and casting the dequeued pointer to a TeamCell.

2009-01-30
93TYPO

>Now we have to take action when an row in the table view is selected.

when a row

2009-03-24
31SUGGEST

You might want to warn the user to save the HelloViewUserController.h file before opening Xbuilder. On my first runthrough, I couldn’t find the outlets for the File’s Owner on page 34. Then I figured out that I hadn’t saved my header file and then in IB I picked “Reload All Class Files”.

2009-01-30
93TYPO

The code sample here references a property named cabinetController, that’s not defined in any of the earlier snippets.

2009-03-24
92TYPO

This is very difficult to follow. It references “The code you can download” but doesn’t link to it. Without that base code (or just figuring out what it’s supposed to be yourself), the examples don’t work.

2009-03-24
162TYPO

Care and Feeding of SQL info box, last sentence:
“…or you’er going to want to.”: you’er -> you’re

2009-01-30
85SUGGEST

The indentation level is incorrect for the code under the “if” statement (lines 9-16) in the example.

2009-01-30
220TYPO

5th paragraph, photo.jpg should be photo.png (Figure 13.1 shows photo.png and photo.png is in the current source)

2009-03-24
95ERROR

When I run the apps from supplied code (both States & StatesMore), I get memory leaks showing up in Instruments. Changing tabs in the apps increases the occurrence of leaks (initially it’s NSIndexPath & GeneralBlock-16). I have drilled down to Extended Details in Instruments, and when I doubleClick main in the Stack Trace this is the highlighted line of code (in main.m):

int retVal = UIApplicationMain(argc, argv, nil, nil);

I can’t work out where the leaks are coming from.

NB: Question posted on Forum about this.

2009-03-24
227TYPO

3rd paragraph: “…to allow the user to only choose one on of the saved photos…” - one on of?

2009-03-24
40TYPO

Footnote has two periods at the end of the sentence.

2009-01-30
41TYPO

There should be a space between UITextFieldDelegate and protocol in the third sentence of the second paragraph.

2009-01-30
96TYPO

3rd para 5th bullet" ‘RootViewControler.xib’-> ‘RootViewController.xib’

2009-03-24
78SUGGEST

It would be nice to describe how to dismiss the text field when the user taps inside the main view, but outside any control.

I have a nice solution in my blog — googling my name and the word “blog” should pop it up.

2009-06-16
28TYPO

Doube word near the end of the page:
“you can can examine the parts of the project by type:”

2009-03-23
88TYPO

Unless I’m misreading it, the first sentence under section 5.1 needs to either remove the word “how” or add what the “how” is, for example: “… on your iPhone works.”

2009-03-24
223TYPO

You say:
‘We are drawing the image with 75% opacity just to show off some of the flexibility…’

in reference to the code:
[image drawInRect:imageRect blendMode:kCGBlendModeDifference alpha:1.0f];

Looks like you’re drawing it with 100% alpha, but with a Difference blendmode.

2009-03-24
216TYPO

2nd para: “We can set other variables that effect how a path is stoked too” should be “…affect how a path is stroked…”

2009-03-24
87SUGGEST

The paragraph on the bottom of the page mentions putting more than one cell design in a nib. It might be worth pointing out that each time one creates a cell using the loadNibNamed:owner:options: method, one will actually instantiate all objects archived in the nib. The logic in your createNewTeamCellFromNib: method will pick out the desired cell, but the others will still be created, unless I’m misunderstanding something about nib loading… in which case that’s something you might want to explain. If I’m correct, though, it might be most economical to keep a single cell design in a nib.

2009-03-23
94TYPO

Why the indent in the code before [self.navigationController pushViewController:self.cabinetController ??

2009-03-24
40SUGGEST

“deserialized”; is that a word? Actually, I know the word. It’s the sentence I’m having trouble with. Take out the second parenthetical remark and your good to go.

Your
application’s first chances to provide custom logic come in the lifecycle
methods associated with the app delegate (such as applicationDidFinish-
Launching:) and the view controller it loads (which gets callbacks like
initWithCoder: when it’s deserialized from the nib and viewDidLoad when
its view is deserialized), although in our application, we don’t need to
do anything until the button is tapped.

2009-03-25
195SUGGEST

In the second paragraph, the second sentence has an “it’s” instead of an “its”. In the next sentence, I’d suggest replacing the comma after “responders” with a colon.

2009-03-24
196TYPO

Another erroneous “it’s” in the first full sentence on the page.

2009-03-24
198TYPO

In the last full sentence on the page, the text says that a previous example demonstrated clearing a view when a user double-taps, but there is no such example in the current text. Also, “tapped” is spelled “taped”.

2009-03-24
57ERROR

Oddly, when I “Open the Editor.xib by double clicking on it.” it had the effect of opening the text version of the file in the text editor. Not sure this was intended, I opened the f ile using File Open in the Interface BUilder

2009-03-23
57TYPO

Then
connect the field outlet from the File’s Owner to the newly placed UITextField
by Control-Clickong

should be “Control Clicking”

2009-03-23
59TYPO

You say “Next we need to connect the text field’s delegate up to the view controller
object”, do you mean the editor view controller or the starter view controller?

2009-03-23
47ERROR

The sayHello: method is not visibly improved by use of properties, as the view controller accesses helloLabel and nameField as instance variables, not properties. Should just tone down the rhetoric here, or find a more useful application of the properties.

2009-03-25
64ERROR

Hmm, this didn’t work for me. First, I have a compiler warning,
warning: no rule to process file ‘$(PROJECT_DIR)/Editor.xib’ of type sourcecode.xib for architecture i386
and second, I have terminating due to uncaught exception. The other examples before I reached this point all worked fine.

2009-03-23
97TYPO

• Create a new nib file that will hole the UI for our new table view controller

— Believe it should be ‘hold the UI’

2009-03-24
158ERROR

The code on this page doesnt compile. There is no type defined for dbFilePath.

2009-03-23
97TYPO

In the third paragraph, last sentence, you are missing the word “this”. The sentence should read, “To accomplish this we need …”

2009-03-24
100TYPO

preform, should be perform

2009-03-24
97ERROR

cabinetController should be declared as IBOutlet for the next step to work.

2009-03-24
163SUGGEST

You mentioning iterating over the results, but display that line of code. I understand you cant put every line of code in the book- but this is a pretty important line.

2009-03-23
2425SUGGEST

I could not find anywhere the details of the icon for the home screen. I would at least think somewhere in the book the dimensions would be mentioned if not how and where to set it.

2009-03-23
78SUGGEST

The default XCode template includes [super viewDidLoad]; in the viewDidLoad method. I’m too much of a beginner to know if this should stay in or not, but I think it might be worth explaining why it needs to come out, if it does need to.

2009-06-16
87ERROR

A prototype for - (TeamCell*) createNewTeamCellFromNib also needs to be added to RootViewController.h - unless you’re happy to put up with the warning. In which case, TabelCell.h needs to be imported in RootViewController.h

2009-03-23
82TYPO

In the second paragraph, I think you mean click on the “Classes” folder rather than “Resources”

2009-03-23
110TYPO

Hi -

I love the book, and have been using it a lot. I was working today, and had some horrible errors.

Specifically, I was using TabBars to switch between my application’s Views. Not only do you have to specify the NIB file for each tab in the TabBar, but also the UIViewController sub-class that is associated with it. This is NOT obvious in the slightest. If you leave out the class, either nothing happens and your class methods aren’t called, or you get a lovely crash with the error:

2009-02-08 23:22:59.697 Space02[11792:20b] * Terminating app due to uncaught exception ’NSInvalidArgumentException’, reason: ’* -[SourceCell nameLabel]: unrecognized selector sent to instance 0x5ed180’

Hmm. Thank goodness for Google, that’s all I can say :-)
The answer cropped in on the Apple support forum, here:

discussions.apple.com/thread.jspa?messageID=8550459

It would be VERY helpful if the book mentioned this. It’s tripped up a few people, and is very hard to debug.

thanks, and keep up the good work!

John

2009-03-24
49-64SUGGEST

Having read chapters 2, 3 & 4, I feel that chapter 3 is in need of either a rewrite or being dropped altogether. It’s not written in a consistent tone to the surrounding chapters (which are much better written in my view) and it goes over ground that’s already or yet to be covered but in a much less clear way.

It’s patronizing too: “You’ve done it.” on page 52, paragraph 2 is an example of that.

2009-04-26
100TYPO

In the first paragraph of 5.6 you mention that “in a more sophisticated application …” and then repeat that on the next page in paragraph 2. Perhaps these should be amalgamated?

2009-03-24
107ERROR

In the final paragraph on this page you say that “The only new bit here is
the use of the method valueForKey:” except that there is no use of valueForKey on this page as far as I can see. There is a use of objectForKey though. I’m not sure whether the text or the code is wrong here.

2009-03-24
287TYPO

longitude/latitude are wrong written on the image

2009-03-24
74SUGGEST

In the begining of section 4.6, creating the view from Interface Builder is inconsistent with directions before and after this section where new views are created in Xcode. While it may be helpful to show that you can do it from either tool, at this point in the book is would be clearer to be consistent and use a “best practice”.

2009-06-16
90TYPO

The first sentence of section 5.1 is not a complete sentence:

“The best way to get a feel for what you can do with a navigation controller is to take a look at how Apple’s Mail app on your iPhone.”

2009-03-24
55ERROR

The last paragraph on 55 says: “When you mouse up on the label you will have a list of Outlets choose label then save the IB file.” The list I see only contains “view” and not the “label” outlet. Also, that sentence seems to be two sentences joined together, making me wonder whether the sentence is just nonsense created as the result of intensive editing.

2009-03-23
56SUGGEST

Nothing in the “Target Action Paradigm” box makes any sense to me. Perhaps a diagram would help here. How does the information in this box relate to the text on page 55? I honestly have no idea of what it is you’re trying to convey, but the grey box makes it seem to be important, and I am frustrated that I can’t understand it.

2009-03-23
57SUGGEST

I think part of the reason I’m having trouble understanding this section is that the variable names are not meaningful. A UITextField named “field” does not help me to understand what’s going on when we switch to the IB and we’re having to look for “field” or “label” or other generic terms used as variable names. Even variables named “x” or “y” would be better because at least then they’d stand out a bit more.

2009-03-23
52ERROR

Hi, I am not sure, but after checking it 2 times in the 3.2 Multiple View Controllers Section. You forgot to mention that you have to add also following line : #import “EditorViewController.h” in the StarterAppDelegeate.m file.
I hope I have not overread it.
Second, I also would mention the order of the #imports .. I had errors during Building the app.. it took me some time to figure out why .. it was just the order of the #import - statements

2009-03-23
B10.0ERROR

Isn’t there anything wrong with the DVDCase app (chapter 5)? The very first time you click on Home or Work and goes the cabinetController, nothing shows up. But when you go back do that again, everything works fine. I downloaded all headers, implementation and xib files to be sure but still no success.

2009-03-23
162ERROR

Shouldn’t insertStatementNS be released at some point after the statement has been prepared?

NSString *insertStatementNS = [[NSString alloc] initWithFormat … ];
const char *insertStatement = [insertStatementNS UTF8String];
dbrc = sqlite3_prepare_v2(db,insertStatement,–1,&dbps,NULL];
dbrc = sqlite3_step(dbps);
[insertStatementNS release]; // add this line?

2009-03-23
55ERROR

The StarterViewController class also needs to synthesize the editorViewController as well as the label in order not to crash.

StarterViewController.m should include this line:
@synthesize label,editorViewController;

And StarterViewController.h should declare two properties:
property (nonatomic,retain) UILabel *label; property (nonatomic,retain) EditorViewController *editorViewController;

I hope that this is the right correction as the Starter app would not run until I completed these elements.

Robert

2009-03-23
248TYPO

“The MPMoviePlayerController provides of state changes and other events during playback.”

missing “notification” or similar

2009-03-23
250TYPO

“Whatever container you use, your video codec must either
H.264…”

missing “be” or similar

2009-03-23
46SUGGEST

It is misleading to state that the synthesized properties you add to the code have any impact on the second version of sayHello:(id). The method works perfectly fine without them, as you rely on the built-in getter and setter for UITextField and UIlabel respectively, rather than any property of the controller-class.

2009-03-25
252TYPO

“• A label for ”00:00" time, in 12-point Helvetica. Its minimum value should be 0.0, its maximum, 1.0.
• A slider for the current time."

“Its minimum value…” apples to the slider, not the text label.

2009-03-23
63TYPO

Bottom of the page: “However is the view is not set … ” The first “is” should be an “if.”

2009-03-23
198TYPO

In the last paragraph on page 198, it refers to a ‘previous example’ section 11.2 that is supposed to cover tracking multi-tap events. Section 11.2 doesn’t refer to multi-tapping at all. The multi-tap section is missing. The source code download has examples called Draw and DrawMulti that demonstrates what is missing from the text.

2009-03-24
94TYPO

“take action when an row in the table view is selected” should be “take action when a row in the table view is selected” unless there’s more to this a/an rule than I’ve been taught.

2009-03-24
235SUGGEST

In the chapter on core animation you mention a couple times that you’re going to “go into more detail” about layers and explain the relationship between views and layers. It would be great if you included more information, and perhaps a diagram illustration the relationship between views and layers. My mental model of this aspect of the iphone is still hazy after reading this chapter.

2009-06-15
214ERROR

Line 28 of the code on page 214 is redundant. The three lines above it have already added the [self pathInRect:one] to the ctx context.

The one line of code on line 28 achieves the same as the 3 lines from 25-27.

2009-03-24
72SUGGEST

last paragraph before “Inserting rows”: the sample implementation doesn’t include the beginUpdates/endUpdates wrapper — and the app works ok (Simulator 2.2.1-Debug). Has this requirement changed, or perhaps the wrapper is important further down the line?

2009-06-16
74SUGGEST

“In IB, let’s create a new interface…” Is it worth mentioning that you must select “Cocoa Touch” on the left before selecting “View” on the right? In my case, “Cocoa” was already selected, and there is an item called “View” there too.

2009-06-16
78TYPO

teamTextField.returnKeyType = UIReturnKeyDone;

Is this the same as setting “Return Key” under “Text Input Traits” in IB? Is one technique better than the other?

2009-06-16
45ERROR

Memory leak in sample code. I haven’t tracked down the source yet, but if you run the sample HelloUser app with instruements in “Leaks” mode you will notice that the following steps create a leaked string:

1) Click text area, type ‘foo’, hit return.
2) click Say Hello
3) click text area again, type ‘bar’, hit return

notice the memory leak.

2009-03-24
94SUGGEST

While adding the accesoryType, should probably note that you need to make two rows in the table (one for home/work). It’s only obvious you need to do this after going through the entire chapter and finally looking at the source code.

2009-03-24
62SUGGEST

Discussing the changes in EditViewController, it would be helpful to mention the import-statement before implementing the methods. Otherwise readers might be confounded by the compiler-errors generated by building the project.

2009-03-23
305TYPO

“With a factor of 0.1, the low-pass filter will use give a 10% weight to the
new value and 90% to its previously-filtered value.”

You should remove the word ‘use’ from the above sentence.

2009-03-23
319TYPO

“After we crate the dictionary”

The word create is misspelled.

2009-03-24
319TYPO

“After that is all setup we add the multi-valued
property to our person object with the address property.”

The word ‘setup’ should be 2 words.

2009-03-24
403TYPO

The Info.plist code to set the app’s icon is HTML encoded

2009-03-24
357TYPO

Sentence fragment at beginning of last paragraph. Replace first period with a comma, and uncapitalize the first letter following (the “I” in “It”).

2009-03-24
358TYPO

Add commas before the first “and” and the first “then” on the page.

2009-03-24
359TYPO

In second line of second paragraph, “so that when ever the message”: change “when ever” to “whenever”.

2009-03-24
359TYPO

In the paragraph before the bulleted list, eliminate the period (after “very simple or very complex”), and uncapitalize the next letter (beginning “Depending”).

2009-03-24
359TYPO

Last sentence of the paragraph before the bulleted list: Change “somethings” to “some things”.

2009-03-24
359TYPO

In the first bulleted item, change “is public API” to “is a public API”.

2009-03-24
358ERROR

First full paragraph, end of third sentence: reference to documentation of mailto URL has not yet been filled in.

2009-03-24
358TYPO

First full paragraph, end of third sentence: reference to documentation of mailto URL scheme has not yet been filled in.

2009-03-24
331ERROR

In the paragraph “Creating an Audio Queue for Playback”, you reference the AudioQueueNewOutput for playback but although the AudioQueueNewOutput for recording, which is false. For recording, it should be AudioQueueNewInput.

2009-03-23
356TYPO

Last line of first paragraph of 21.1: “ah” should be “at”.

2009-03-24
358SUGGEST

End of penultimate paragraph of 2.1: Since the name of the URL scheme document has changed, I recommend dropping “iPhone” from “iPhone URL
Scheme Reference”. You might also consider recommending a search for the phrase contained in a title, rather than a full text search. There aren’t as many relevant hits, but the most relevant is obvious.

2009-03-24
358TYPO

Delete the last period in the penultimate paragraph of 21.1.

2009-03-24
398TYPO

Last paragraph: “ad-hock” should be “ad-hoc”, or even better an italicized “ad hoc”.

2009-03-24
398TYPO

The word “setup” should be replaced by “set up” on pages 58, 74, 241, 347, 354, and 398. (Do a search of the PDF with Adobe Reader to find these.)

2009-03-24
401TYPO

Second complete paragraph: Second sentence is a run-on. After “leave it out”, change the comma to a period and capitalize the first letter of “even”. Also, add a comma after “cool looking” (and maybe change “cool looking” into “cool-looking”).

2009-03-24
401TYPO

Third full paragraph on the page, fourth sentence: Change “your self” to “yourself”.

2009-03-24
404TYPO

Third full paragraph on this page, first sentence: change “ad-hock” to “ad-hoc”, or perhaps and italicized “ad hoc”.

2009-03-24
95TYPO

First line on page “… when an row …” should be “… when a row …” [I know … very minor, but thought you’d like to know]

2009-03-24
99SUGGEST

end of 3rd paragraph: “… create a new subclass …” I think you are reiterating the steps to build a new table view based UI, however at first reading this appears to be an instruction to the reader to actually go ahead and create another new .xib file, etc. perhaps changing to “creating …” would be a clearer.

2009-03-24
42TYPO

4th paragraph, 3rd line: “events that effect the whole application” should be “events that affect…”

2009-03-23
99TYPO

end of first paragraph: “… Set the NIB Name … to DVDCabinetController.xib” This doesn’t work, the NIB Name must be set to “DVDCabinetController” (i.e. w/o the extension).

2009-03-24
94SUGGEST

Not clear enough that you want reader to create code here; also not clear elsewhere that you are NOW expecting reader to insert code for @synthesize, #import, etc. State somewhere clearly that you are now expecting the reader to know enough to create their own code to supplement the snippets in the chapter.

2009-03-24
68SUGGEST

Based on what has come previously in the book, it is not at all obvious to me what this line of code does:

if (self = [super initWithCoder:coder])

Any chance for a bit of explanation on that? I can see that the idea of the method is to initialize the “teams” array, but don’t grok that bit.

2009-06-16
110TYPO

Missing space after period - 3rd Paragraph, “Open your new … to ByAreaViewController.Next …”

2009-03-24
110SUGGEST

3rd Paragraph starting: “Open your new xib …” There is NO ByAreaViewController in the new xib file, so “connect the ByAreaViewController’s view outlet to the table view.” isn’t making sense to me.

2009-03-24
58TYPO

4th para: “Control-Clickong” should be “Control-clicking”

2009-03-23
98TYPO

Second bullet down is: Create a new nib file that will hole the UI for our new table view
controller

‘hole’ should be ‘hold’ Loving the book!

2009-03-24
279SUGGEST

Could you please define which Synthesizer application on the Mac you used to create the audio files…I want to do the same thing, but I can’t figure out which app you used to save the voice to a file.

BTW, I have downloaded and read just about every other book on iPhone development, and this is book is far-and-away the best I have read. Your approach is elegant and well thought out! I recommend this book to everyone who asks!

2009-03-23
52TYPO

Adding buttonClicked in this manner to the File’s Owner class action will add the action to the ButtonViewController.xib. This is incorrect and the process will crash horibly with the warnings about not finding the UIKit in /System/Library/Frameworks. Try it. Upon inspecting after the build, I found that that the image on the top of page 52 had two actions. If I removed the buttonClicked action on the .xib file and left the ButtonViewController.h file, all worked. Please address this broken process as it just wasted me 3 hours pulling my hair out.

2009-03-24I can not reproduce the error discussed here. Sorry that it cost you 3 hrs but I don't think the process lead to unknown UIKit framework. \n \nI'm marking it as fixed but if you are still having trouble with it please post to the forum and we can help you get to the bottom of what is going on here.
210TYPO

Last paragraph, right before section 12.3 starts (Paths): paragraph begins with ‘Congratulations you have…’ should be ‘Congratulations, you have…’

2009-03-24
53TYPO

The last sentence in the page: “When we type something into
the field and clicked the Done button the new value is placed in the label on the first view and the second view is removed from the window.” should read ‘click’ instead of ‘clicked’, in order to match tense.

2009-03-23
6464TYPO

However is the view is not set then the view con-
troller checks to see if its nib file is set.
Correction:
However, if the view is not set then the view con-
troller checks to see if its nib file is set.

2009-03-23
92TYPO

Diagram at top of page refers to “DVDController” but explanatory text below refers to “DVDCabinetController”

2009-03-24
122TYPO

In the last paragraph, one of NSFileManager’s methods is described. The text quotes it as
fileExistsAtPath:isDirectory
and then goes on to describe the second parameter. Since it accepts two parameters, shouldn’t its selector have two colons? I believe it should be
fileExistsAtPath:isDirectory:

At least, this is what I would expect in SmallTalk. It is also how the documentation bundled with Xcode lists the method. Otherwise, it looks like a single parameter selector whose parameter is named “isDirectory.”

2009-03-23
123SUGGEST

“For what it’s worth, if you only care about checking whether something exists at a given path, and don’t care whether it’s a directory or a file, you can simply pass NULL for isDirectory.”

This is not a great suggestion. There is a perfectly good method which only takes the single parameter, fileExistsAtPath:

I would hate to come across a code base one day that is littered with lines and lines of [NSFileManager fileExistsAtPath: path isDirectory: NULL]. All those extra characters! :(

2009-03-23
108TYPO

The text refers to valueForKey: in the text at the end of the page — ‘The only new bit here is the use of the method valueForKey:.’ But the new selector in the code listing is objectForKey: — ‘cell.text = [[self.states objectAtIndex:indexPath.row] objectForKey:@“name”];’

2009-03-24
113TYPO

“Next up we will start to see some of the lower level API’s to interact with the iPhones file system.”

Rather than “iPhones”, this should probably be the possesive “iPhone’s”.

“Next up we will start to see some of the lower level API’s to interact with the iPhone’s file system.”

2009-03-24
98TYPO

3rd para: “To accomplish we need to…” should be “To accomplish this we need to…”

2009-03-24
75SUGGEST

In the second to last paragraph on this page, “Choose the View Template” is a bit confusing. I assume that user should choose “Cocoa Touch” in the left menu first and choose “Cocoa Touch View Template”. There is also a “Cocoa View Template” if the user chooses Cocoa only in the left menu. See the confusion? I think it should be clearly pointed out that the user should choose “Cocoa Touch View Template” instead of just “View Template”.

Also, when saving this new view, IB takes the user to the documents folder. Maybe for someone it’d be beneficial to know that they should navigate to their BasketballTeams project folder and save it there.

2009-03-23
78SUGGEST

It would be nice to explain here why we’re importing RootViewController.h in AddTeamViewController.H (header file) and just moments after we’re importing AddTeamViewController.h on top of RootViewController.M (implementation file, and not header file!)… This is a bit confusing. Some things we import into header files, others we import into implementation files. Why? :)

2009-06-16
205SUGGEST

I think that layers are used for the first time in this PinchZoom example; as far as I can tell they are not explained at all in this example or prior to it. This makes the awakeFromNib method unexplained “magic”.
General comment: it is difficult as a reader to know when to create my own code and when to just load and use the code you provide. Seems to change a couple times within the book up to this point.

2009-03-24
217TYPO

“We can set other variables that effect how a path is stoked too,”; “stoked” should be “stroked.”

2009-03-24
321TYPO

“Some apps might just do a little processing on the incoming audio and then drop the data on teh floor” Replace “teh” with “the”

2009-03-24
58SUGGEST

The first full paragraph of text says something to the effect that properties were not explained yet, though they were in Seciton 2.7, and in much greater detail than is presented here. “For more details on both the proper -
ties and protocols of Objective-C see the Apple docs [?].” Perhaps that should be changed to backreference to 2.7?

2009-03-23
223DEFER

Would it be possible to get more information on working with images? It’d really be helpful to have more information on things like image zoom and manipulation added. Information on dynamically loading images would really be helpful too.

35SUGGEST

In general, use Layers for screenshots so that you easily can strip away background noise - makes the book look better (which always is a good thing). It also saves time, as cropping, masking is a thing of the past.

2009-03-23
75SUGGEST

Why is the view called “AddTeamViewController” and not only “AddTeamView”? The class that manages AddTeamView should be the AddTeamViewController - maybe? Or am I missing something here?

2009-06-16
215ERROR

The code as written on this page a) adds each path twice and b) leaks memory.

The CGContextAddPath(ctx, [self pathInRect:one]); are not necessary. They also leak a reference to a CGPath.

2009-03-24
74ERROR

Both the teams and addButtonItem should be assign (default) vs retain properties. When you create the NSMutableArray for teams it already has a retain count of one and by the time you assign, it then has a retain count of two. Same goes for the constructor for the addButtonItem property.

Because of this I am very confused as to why you would suggest that you call autorelease on the addButtonItem where you did not on the teams object as well.

2009-06-16
124TYPO

The main code sample has "FileOverviewView" and it should be “FileOverviewViewController” for loading the nib.

2009-03-24
99TYPO

end of 3rd paragraph, “involves these steps, create a new..” should be a colon instead - that is, “Building any table view based UI typically involves
these steps: create a new subclass of UITableViewController, create a new
View XIB file, switch the view for a table view, set the data source and
delegate.”

2009-03-24
176ERROR

The name of the “spinner” class is UIActivityIndicatorView, not UIActivityIndicator.

2009-03-24
177ERROR

Line 4: the signature of the method is “expectedContentLength” without the colon, not “expectedContentLength:”.

2009-03-24
181SUGGEST

Regarding the text editors: you don’t need a console editor or a special launcher - you can just use the “open” command to launch your favourite editor, e.g. “open httpd.conf” or “open -a Smultron httpd.conf”. You can also press Cmd+Shift+G in Finder to show a “go to folder” dialog, enter /etc/apache2, and do whatever you want with the file once the folder contents are displayed.
(One caveat: Textedit seems to be unable to save a file owned by root, but Smultron has no problems with it, it just asks to authenticate).

2009-03-24
186SUGGEST

I think I know what you meant, but “user is often never aware” sounds a bit weird…

2009-03-24
41TYPO

“Every iPhone object must have a single UIWindow object” -> did you perhaps mean “every iPhone application” ?…

2009-03-24
50SUGGEST

Re #37622: I personally don’t find the phrase “You’ve done it” offensive in any way…

2009-04-26
23TYPO

Missing a comma after “well” in " it (well technically"

2009-03-24
29TYPO

See “chap.mediaplayback” in “oundation, Core Audio, and Quartz / Core
Graphics, and will be introduced in the (as yet) unwritten
chap.mediaplayback.”

2009-03-24
58TYPO

“There are two new concepts here” - not true, see earlier examples.

2009-03-24
77ERROR

The “teamTextField” and “view” Outlets should be
assigned.

ALSO - the Navigation..

2009-06-16
79ERROR

in viewDidLoad, do you needs to call to [super viewDidLoad]? before or after the content for this class? The template has the call in it…

2009-06-16
15TYPO

last sentence of paragraph 2: … we are going to start introduce you to …

2009-04-30
19TYPO

3rd paragraph first sentence:
“On the left side below the toolbar is the file/resource list.” — It’s on the right side.

2009-04-30
61ERROR

Some references in your latex document are not right -> [?]

2009-07-15
24TYPO

On my Kindle, this graphic (Kindle location 205) and the next graphic (Kindle location 215) show up as a tiny, unreadable graphic at the lower left-hand corner of a large black rectangle.

2009-06-15
78SUGGEST

“Also, since this is the first time we’re referring to RootViewController from
within AddTeamViewController.h we’ll need to import it.” - instead of importing, it would be better to use the @class keyword to just declare it.

2009-06-16
78ERROR

“In addButtonWasPressed we’re going to load a new AddTeamViewController from its AddTeamViewController nib file.” - I think this is a bit inaccurate, because the controller object itself isn’t loaded from the nib - it’s just created, and only after that it loads the nib with the view.

2009-06-16
80SUGGEST

“Because textFieldShouldReturn: is a method of UITextFieldDelegate’s pro-
tocol, we need to declare that our AddTeamViewController fulfills the
UITextFieldDelegate” -> this is a bit redundant, because we’re already done this on page 76: “We’ll also declare that the view controller implements the UITextFieldDelegate protocol, in order to handle events related to the dismissal of the keyboard.”

2009-06-16
96SUGGEST

“But you can set the backBarButtonItem on the navigationItem of any view controller to change the back button title (or other properties) to be anything you’d like.” -> you could add that by setting backBarButtomItem, you change what’s displayed when the given controller is BELOW the top controller, in contrast to leftBarButtonItem and rightBarButtonItem, which change what’s displayed when the given controller IS the top controller. This wasn’t obvious for me at first…

2009-04-30
110ERROR

“Next we need to do the same thing we did for the ByPoplulationViewController. First delete the existing view, then add a table view to the xib file.” -> This is NOT the same, because in ByPopulationViewController we were told to add the table view into the existing view, not replace the existing view with a table view.

Also, Population not Poplulation (in the name of the controller).

2009-04-26
113ERROR

“Congratulations. You have been through all the view controllers that
come with Cocoa Touch.” - No, I haven’t! There’s still the Image Picker Controller, which will be introduced in chapter 13 :)

2009-04-26
64TYPO

bottom paragraph: “However is the view is not set then the view controller checks to see if its nib file is set.” - I believe this should read “however if the view…”

2009-04-26
69DEFER

I think this line in the sample code will need updating for the 3.0 revision of the book:

cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero
reuseIdentifier:CellIdentifier] autorelease];

I dont know if I can give much more detail due to the nda. try it and you’ll see why it doesnt work

2009-06-16Yes, the table material will need extensive reworking for changes in iPhone SDK 3.0, thanks.
301TYPO

“we’ll set up variables for the ball’s location and position” should maybe be “we’ll set up variables for the ball’s location and velocity”.

2009-04-29
359TYPO

second Paragraph from the bottom reads

“Let’s look ah how to launch Safari with this mechanism. ”

Should be

“Let’s look at how to launch Safari with this mechanism. ”

Thanks - keep up the fantastic work.

2009-04-26
72SUGGEST

[V]iewDidLoad code sample missing Download link — this is helpful when the class name is the last word (makes it easy to know which file we’re editing).

2009-06-16
144DEFER

I think the part on flippable views will eventually need rewriting for 3.0. unless I’m doing something stupid, they’ve changed the utility template again. no more RootViewController class, etc

2009-06-16We'll review all the material to make sure it still makes sense for iPhone SDK 3.0, but we won't be able to make such changes until the 3.0 NDA drops. Thanks.
384ERROR

Paragraph 4 Sentence 2:

‘Bring up its Inspector with Get Info (D I or the “Info” toolbar button) and choose the “Variables” tab.’

Should be Variables section of the “Arguments” Tab

2009-04-29
121ERROR

In the setDirectoryPath: method you should perform the [p retain] before doing the [directoryPath release]. Otherwise, if both point to the same string it would be possible for the string to be deallocated and removed from memory which would cause the [p retain] to explode in your face. I know it’s an unlikely scenario but it’s still best practice.

2009-04-29
252ERROR

When implementing MPMoviePlayer, should you no release the instance? With the current code, every subsequent tap of ‘play’ causes a flicker at the beginning of the clip.

2009-04-29Yes, the instance should be released in dealloc, so that's a bug in previous versions, corrected in beta 13. However, the player is created only once, in viewDidLoad, and not every time you tap "play", so a memory leak can't be blamed for the "flicker" you see.
138TYPO

“for the preferences.. ” - two dots at the end of the sentence

2009-04-29
354TYPO

In the home address keys array,kABPersonAddressStreetKey is shown twice. The second one should bekABPersonAddressStateKey, based on the corresponding value.

From PDF:

CFStringRef keys[4] = {kABPersonAddressStreetKey,
kABPersonAddressCityKey,
kABPersonAddressStreetKey,
kABPersonAddressZIPKey};

CFStringRef values[4] = {CFSTR(“765 Four St.”),
CFSTR ("Fivesville"),
CFSTR ("CO"),
CFSTR ("80424")};

2009-04-30
142TYPO

“notMainWindow.xib” -> missing space (at least that’s how Preview shows this)

2009-04-29
143OK

“we’ve given the FlipSideViewController the methods uses24Hour, setUses24Hour, selectedTimeZone, and setSelectedTimeZone” - did we? I don’t remember doing that… I understand that you probably meant something like “Please add those methods now yourself, or look how it’s done in the example code that you can download” - but it’s confusing for the reader… it sounds like something that should already be there, but is not.

2009-07-02That sentence begins "In the sample app," by which we mean the downloadable sample code. I thought these kinds of getters and setters were too trivial and too much a distraction from the preferences stuff to make any more than a fleeting mention of.
146SUGGEST

You could use the NSTimer’s method scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: - that would be much simpler.

2009-04-30Great suggestion, the convenience method is a lot simpler than rolling an NSInvocation by hand.
143ERROR

In the downloadable code for FlippingPreferableClock, in the last line of RootViewController#setMainViewFromPrefs, the casting to (NSString*) is not necessary, because prefTimeZone is already an NSString.

2009-04-29
141OK

IMHO it would be more natural to store the 24-hour preference as a BOOL wrapped in an NSNumber, instead of a "YES"/“NO” string. But that’s just my opinion…

2009-07-02Yeah, I can go either way on this. Boolean values as ints is very much in the C tradition, which a lot of us come from (myself included). But since that line of thinking isn't necessarily intuitive to those with other backgrounds, or who are starting their programming careers on the iPhone, I think it's helpful to use the more obvious (if perhaps less efficient) strings.
95TYPO

First line, ‘where an row’ should read ‘where a row’

2009-04-30
148ERROR

You say that the settings icon should be named Icon.png and located inside the Settings bundle; this is incorrect. If I copy an icon inside the bundle, it doesn’t even show up in XCode. Instead, the icon should be named Icon-Settings.png and put in the project bundle root, next to the Settings bundle.
If there is no settings icon, iPhone tries to use the main application icon, with a name specified in Info.plist (which, by default, is Icon.png), but this one must be sized 57x57.

2009-04-29
153SUGGEST

I think it’s worth mentioning that the NSUserDefaults way of storing preferences is also available when you have your own preferences screen inside the application, like in the first part of the chapter (and it’s probably easier to use than the method with saving an NSDictionary to a file manually). Right now, the reader might get an impression that you can only use NSUserDefaults if you have a Settings bundle for Preferences application.

2009-04-30
1DEFER

I just spent half my day messing around with scroll views before finding a video that happened to mention the property I needed to set (contentSize) to actually get it to scroll. This property isn’t exposed in IB (at least in the version that ships with the first release of the 3.0 SDK), so you have to set it programatically. I couldn’t find any mention of UIScrollView in the book, and it would have saved me a lot of time.

160SUGGEST

Referring to the first paragraph (describing using NSSearchPathForDirectoriesInDomains() to get the path of the Documents folder). This technique is used in the previous chapter to generate the file path for the preferences file (p.141) with no information given about it at that time.

I’d suggest moving the p.160 description back to then.

2009-04-29
156ERROR

Not in the book (had to put in a page#), but rather the sample code: FileIO/DatabaseShoppingList/DatabaseShoppingListAppDelegate.m

In applicationDidFinishLaunching:, when setting up the tab bar controller, and specifically the array of controllers for it, you’ve used an NSMutableArray as a workaround instead of a standard NSArray:

\t// initWithObjects should be a perfectly good way to create the array of controllers
\t// for the tab bar, and works fine in the simulator, but leads to an EXC_BAD_ACCESS
\t// on the phone in 2.0 (5a345). workaround here is to use an NSMutableArray.
\t// NSArray *controllers = [[NSArray alloc] initWithObjects: addItemViewController, listByPriceViewController];

The problem is that it’s missing the final nil - the last line should be:
\tNSArray *controllers = [[NSArray alloc] initWithObjects: addItemViewController, listByPriceViewController, nil];

Works fine then :D

2009-04-29Good catch. As it turns out, that stuff was a workaround for really old versions of the iPhone SDK, back when we had to set up tab bar controllers in code. In beta 12, we switched this example to the tab bar provided by Xcode's "tab bar application" template, so the offending code is gone anyways.
18TYPO

The end of the last sentence of the second paragraph should read: “…to your heart’s content.”

2009-04-30
94TYPO

First sentence: “…code lets look at this nib file.” missing an apostrophe in “let’s.”

2009-04-30
26TYPO

At the end of the second paragraph you say to choose “Device — iPhone OS 2.0 item”. Shouldn’t that indicate that you should chose the version that matches the OS running on the attached iPhone (currently 2.2.1 but could change).

2009-04-30
51SUGGEST

in the .mobi version of this file (approximately location 611 on a Kindle), the graphic on PDF page 51 is 90% blank, with the real graphic taking up only a fracion of the page. Even zooming it results in a graphic that is too small to read.

2009-04-30
52SUGGEST

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.

72TYPO

Illustration shows “Done” button on left side of title bar. When running simulator with version 2.2.1 the “Done” button appears on the right side of the title bar.

2009-06-16
75TYPO

Section 4.6, Paragraph 2, it states “In Interface Builder …”. This should be “In Xcode …”

2009-06-15
79SUGGEST

Section 4.9, paragraph 2, Changing the text of the key from “return” to “Done” can also be done in the Interface Builder by selecting the text field then going to attributes and changing the “Return Key” item under “Text Input Traits” to “Done”.

2009-06-16
83TYPO

Should say File’s Owner’s “teamCell Outlet” rather than “tableCell Outlet”

2009-06-16
101TYPO

“preform some action” should be “perform”

2009-04-26
100SUGGEST

This page has the first and only mention of “symbolic constants” in the book - I’m left wondering exactly what was meant by this statement (as I’m new to objective C).

2009-04-26
78SUGGEST

The interaction that is described in the first two paragraphs here is difficult to follow. The concept here could use a supporting diagram showing all the relevant objects and methods, and the order in which they are used.

2009-06-16
41TYPO

“Loaded from HelloUserViewController.xib.” is shown in my IB as ““Loaded from HelloUserViewController”

2009-04-29
290TYPO

The text “/Developer/Platforms/iPhoneOS.platform/Developer” runs off the edge of the PDF version of the book.

2009-04-30
255SUGGEST

You should mention that framework AVFoundation must be added to the project.

2009-04-29
94SUGGEST

Similar to the other comments, I would say that it is unclear how you expect the reader to get to the point where the instructions on p. 95 make sense. You seem to imply that he should download the code for RootViewController, but if he does that, then it already contains the code you are about to tell him to insert. If you expect him to build it up himself, then it’s not enough to just refer him back to the previous chapter. Making him figure out how to accomplish the prep tasks is ok, but making him figure out what those tasks are by simply referring to Chapter 4 is asking too much.

2009-07-15Hi, and thanks for taking the time to post an errata! \n \nI'm trying to fix this and I don't see where the instructions on pg 95 refer to downloading the code? Could you elaborate with maybe some text I could search on so I can find and fix the problem? \n \nThanks again!
95SUGGEST

It is jarring to be asked to insert code for tableView:didSelectRowAtIndexPath: that makes extensive use of the cabinetController object when we have virtually no idea what it is yet. You should mention before the code listing that the cabinetController is an instance of a view controller class that you will be creating shortly.

It also feels hollow to tout that “it only takes one line of code” when we’ve just been given 8 lines of code. I would suggest delaying having the reader insert the setup code until after he understands why it’s necessary. Since he doesn’t know anything about the cabinetController yet, it isn’t helping him to see this stuff now, it’s just confusing. Alternatively, you could delay the entire code insertion until you’ve explained the cabinetController. Either way, this section is titled “Pushing View Controllers” and most of the code here has nothing to do with the actual push.

2009-04-30
46SUGGEST

It would be worth mentioning in the Property discussion - at least in a footnote if not in the body text - how the different Objective C runtimes relate to iPhone apps. It seems redundant to have to declare an instance variable and then declare it again as a property - and it is with the modern runtime. Does the iPhone use the legacy runtime? If so, mention that this runtime does not support instance variable synthesis, thus the need for redundancy. If it uses the modern runtime, why do the code examples alway explicitly declare instance variables to go with property declarations?

2009-04-29We are adding a sidebar to discuss the fact that the modern runtime lets you omit the explicit use of an ivar... and how we're using the old style so that the examples can all compile for and run on the simulator.
218ERROR

Bug/Leak in BarGraphView.m
The path for “one” gets added to the context twice. The second time (on line 28) is a leak.

2009-04-30
89OK

I don’t think this way of getting custom cells is better at all. The loop in the previous version was a little hackish, but followable. This method uses magic numbers (the tags), isn’t as logical, and isn’t much less code. The only upside is getting rid of the convenience method from the previous version, and I don’t think that’s really all that much of an upside. Just my .02.

2009-07-02Thanks for the feedback. This approach does seem more slight-of-hand-y and less explicit than what we had in previous betas. What recommends it, aside from eliminating two classes (the custom cell class and the factory for getting cells from nibs), is the fact that this is explicitly what Apple's UIKit engineers advised me to do, while I was doing some work for them not related to the book. It's also what they showed at WWDC 2008.
131ERROR

Memory leak in code sample following Paragraph 2:
“loading the file into the view can be reduced to a single line of code:”

fileContentsTextView.text =
[[NSString alloc] initWithContentsOfFile: filePath];

This would cause a memory leak, since UITextView copies the argument when setting the text. The parameter to UITextView#setText should either be an autoreleased object, or be released after setting. Change to:

fileContentsTextView.text =
[NSString stringWithContentsOfFile: filePath];

2009-04-29Not only that, the initWithContentsOfFile: and stringWithContentsOfFile: methods are deprecated in favor of three-arg versions that deal with text encodings and provide an NSError if they fail. We'll use the autoreleasing stringWithContentsOfFile:usedEncoding:error: in the next beta. Thanks.
95TYPO

The nib file name in the last line of the page is “RootViewController.nib,” which should be “RootViewController.xib.”

2009-04-30
97ERROR

The sample code you have added since B11 (which is nice, thank you) already includes the “cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;” code that you then tell the reader to insert later on the page in section 5.4.

2009-04-30
252TYPO

First paragraph after the first listing, “because it’s zPosition is set.” It should be its, not it’s.

This sort of thing drives me nuts. When I wrote my book, I grepped the whole thing for ’it’s," and audited each use.

2009-04-26
105SUGGEST

It would be nice if we were instructed to Build & Go at this point. Also, unless I missed it, we were never told to @synthesize the key property in DVDCabinetController - I realize we should know it by now, but when following step-by-step processes, it’s not natural to stop at every step and question whether there is anything else we are supposed to be doing on our own volition.

2009-04-26
98SUGGEST

The text here mentions synthesizing the cabinetController property, but it seems to imply that we will be told to do it later and that we should not be doing it now. The phrase " We will look at adding this stuf f to the header shortly." is vague, and does not necessarily imply “however you should put the @synthesize into the .m file now.”

2009-04-26
96TYPO

Unless I’m missing it, nowhere do you actually tell the reader to set the title of the RootViewController to “Cases.” As a result, when he runs the application, there is no title to be used for the back button when navigating into a case, so the iPhone does not provide a back button (somewhat undoing much of the purpose of the chapter ;-)

I see in the downloaded code that you set it in RootViewController’s viewDidLoad. It also seems like it should be possible to set it in IB, but I could not figure out where to set it that way. If that is not possible, a discussion of why would be helpful.

2009-04-30
51TYPO

2nd para: 2nd sentence starting: “The manage getting the screen full
of infor mation, a view, onto the screen and manage when its time to
leave” could probably be: “They manage getting the screen full
of information, a view, onto the screen and manage when its time to
leave”

2009-04-26
167ERROR

When adding libsqlite3.dylib to the project (step 1), you expand the “Targets” group, not the “Executables” group. (LInked libraries are specified in the Inspector view for the app Target, not the Executable.)

2009-04-29
0OK

Hi, I would like to ask the authors if they can include in the next beta, a chapter about the streaming video. I think such subject is missing in the book. In the 3.0 Apple has added a support to streaming video. Regards

2009-07-02The "HTTP Live Streaming" protocol is mentioned in the "Streaming Support in iPhone OS 3.0" sidebar in beta 14.0. Note that this is primarily a server-side concern, so you don't have any work to do in your iPhone app other than providing a URL to the MPMoviePlayerController.
112ERROR

You call the IB view mode “browser mode.” Personally I’ve never heard this before. In the Finder, this is called “Column View.”

2009-04-26
113TYPO

In the text, you instruct the user to delete the label from the ViewController’s view, then add a tableView, and make it the ViewController’s view. However this is not possible because you end up with the tableView inside the existing view, and you cannot remove the default connection from the view controller to the original view. Also this does not match what has been done in the downloadable source; there it appears you have deleted the entire original view from the view controller and replaced it with a table view. When you do this, you do not have to set the table view as the view controller’s view, it happens automatically. FWIW, I’m using XCode 3.1.3 Pre-release.

2009-04-26
44TYPO

Should the code sample for textFieldShouldReturn have textField instead of nameField on line 2?

2009-04-29
48SUGGEST

Make it clear that the property declarations should sit outside the interface block.

2009-04-29
49TYPO

Unnecessary */ at the beginning of first listing.

2009-04-29
51TYPO

when its time to leave -> when it’s time to leave

2009-04-30
51TYPO

They typically are the class we place method implementations -> They typically are the classes in which we place method implementations ?

2009-04-30
228DEFER

BarGraphView seems not to work with 3.0 beta 3. Instead of the bargraphs I only see a gray view, just like the background color in the other examples. Maybe there’s something broken in 3.0?

2009-08-20we can't do 3.0 stuff until the nda is lifted, but we will address all this kind of stuff and every example will run in 3.0 before the book ships. \n \nThanks for taking the time to submit an errata!
174OK

The example on chapter 9 (The SQLite Database) has a runtime error (Program received signal: “EXC_BAD_ACCESS”. ) on the line [shoppingListItems release] into the file ListByPriceViewController.m. [NSMutableArray shoppingListItems] returns an autoreleases mutable array. You don’t need to (and should not) release it. In general all methods like this return autoreleased objects whereas alloc init returns objects with retain count 1.

2009-07-02I agree with your reasoning about autoreleased objects. However, at least in the downloadable example code, shoppingListItems is not autoreleased. It's created with the line: \n shoppingListItems = [[NSMutableArray alloc] initWithCapacity: 100]; \nwhich creates the array with retain count = 1.
51TYPO

Please Note:

Line 6:

The manage getting the screen full of information, a view, onto the screen and manage when its time to leave.

Should be:

They manage getting the screen full of information, a view, onto the screen and manage when its time to leave.

Thanks

2009-04-26
103SUGGEST

The header file contains the @property call for the key NSString but not for the data NSDictionary. Shouldn’t it ?

At that point in the book, it may still be useful to remind the reader to use @synthesize.

2009-04-26
80TYPO

“We want to be able to pass control over to the AddTeamViewController
now. This will happen when the Add button is pressed. Add #import
AddTeamViewController.h to the top of RootViewController.m, then add the
following code to addButtonWasPressed. ” —> Should be Add #import “AddTeamViewController.h”

2009-06-16
85TYPO

“This cell is what we want the RootView-
Controller to use as an outlet, so connect File’s Owner’s tableCell outlet
to the cell icon.” —> Should be teamCell, not tableCell

2009-06-16
53ERROR

I think the image displayed is wrong.

2009-04-30
123TYPO

In Exploring Directories section, the second line, there are two “will” in the sentence.
“which will will…”

2009-04-29
136TYPO

The second case statement (case NSStreamEventErrorOccurred:) should end with break, or it shouldn’t have [inputStream removerFromRunLoop…] and [theStream close] at the end.

2009-04-29
136ERROR

Navigating out of the File Contents View before NSStreamEventEndEncountered is processed causes application crash with EXC_BAD_ACCESS signal. It can be reproduced on iPhone by opening any large file and quickly going back to a Directory View.

2009-04-30Wow. Interesting bug. Thanks! Problem is that the run loop keeps servicing the input stream, even after the user navigates off that view. Crash is an over-released object. Fix (in next beta) is to do the unschedule from run-loop and close steps in a viewWillDisappear: override.
51TYPO

It’s probably my lack of knowledge of the english language, but on page 51, the introduction to View Controllers, shouldn’t the second sentence of the second paragraph start with “They”..? Here’s the original sentence: “The manage getting the screen full
of infor mation, a view, onto the screen and manage when its time to
leave.”

2009-04-30
60SUGGEST

Chapter 3.4, perhaps explicitly tell the user to save the EditorViewController.h file before adding the Editor.xib file because otherwise the messageInputField outlet won’t show up in the Editor.xib File’s Owner because it doesn’t know about it’s existence yet.

2009-06-15
77SUGGEST

The second paragraph of Chapter 4.6 says “In Interface Builder let’s create a new interface by selecting File->New from the menu”, however, the user should do this in Xcode rather then in Interface Builder to create the new file based on the View XIB-template.

2009-06-16
167ERROR

paragraph 1 sentence 2 reads ‘expand the “Executables” item…’

should read ‘expand the “Targets” item…’

2009-04-30Duplicate of #38900
220OK

Can I get a reference to my ZergSupport library in “more XML parsing options” please? My library makes it very easy (promise) to exchange data with Web services.

Currently, the first two results for googling “zergsupport” point to the code in GitHub, and to my blog post describing why I think it’s useful. I’ll be happy to provide hyperlinks if the Google searches don’t work out for you.

Thanks!

2009-07-15Thanks for your comment.
54TYPO

The first paragraph of chapter 3 says:
Your view controller is the “V” in MVC (Model-View-Controller).
shouldn’t this be:
Your view controller is the “C” in MVC (Model-View-Controller).
i.e the ViewController is the controller?

2009-06-15
64SUGGEST

The code here is incomplete. You need to mention that the @synthesize declarations are necessary. You do mention this on page 68 for the MovieEditorViewController, but not here.

Someone following the code out of the book who is not yet quite with it will not be able to get working code when they are told to build and go on page 66.

This text from page 68:

“Now that we have our inter face defined, let’s build the implementation.
The first thing to do is import the Movie.h, for every class forward dec- laration you do in the header file you almost always have to import the header file for that class in the implementation file. The next thing to do is to add the synthesize statements for each of
the properties. I always put these statements at the top of the @imple-
mentation block so I usually do that first when building a new imple-
mentation. ”

should actually be placed on this page.

2009-06-15
163TYPO

“we dno’t need one” -> we don’t need one

2009-07-02
64TYPO

“when its finished” -> when it’s finished

2009-06-15
66TYPO

“Congratulations you have successfully build” -> Congratulations, you have successfully built (comma & past tense)

2009-06-15
67TYPO

“UI will with 3 text fields” -> UI will have 3 text fields? UI with 3 text fields?

2009-06-15
146SUGGEST

I am finding this chapter very frustrating. I’m currently on the section about reading the file asynchronously. You don’t tell us anything about how to set up the FileContentsViewController, you only give us a couple of the methods. For example, you give us setUpAsynchronousContentLoad, but you don’t tell us where to call it from. You also don’t tell us how filePath ever gets set in the new FileContentViewController instance.

You also don’t indicate that we should stop and check that our application works at this point. It’s very difficult to check our work by having to compare to the sample code which includes everything through the end of the chapter, and having to sort out what we aren’t supposed to have done yet from what we are supposed to have guess on our own that we were supposed to do even though you never mentioned it.

2009-07-14
66ERROR

I had to change -(void)viewWillAppear:(BOO)animated { -to (void)viewDidAppear:(BOOL)animated { in order to get the view to update once I press the “Done” button from the MovieEditorViewController

2009-07-15Hi Jamaal, \n \nCould you post more detail in the forum. \n \nWorks fine for me with viewwillApper
93SUGGEST

While I am trying to figure out why my Basketball example does not work and your sample code does, I noticed that in RootViewController.m you have uncommented the viewWillAppear, viewDidAppear, viewWillDisappear, and viewDidDiappear. super calls were removed for the last two. however, you make no mention of this in the text.

2009-06-16
64TYPO

Next to last sentence on the page:
“… the viewController property is connect [to] our movie view controller.”
The “to” above in brackets is missing in the text.

2009-06-15
64ERROR

the @synthesize values were never mentioned for the Labels. They show up in the download, but it wasn’t mentioned that they should be taken care of. Maybe assumed?

2009-06-15
216ERROR

#define for INTERESTING_TAGS needs to end with “, nil”, since it’s used in NSSet initWithObjects:, which takes a nil-terminated vararg list. Without the nil, this is a reported crasher (see forums).

2009-05-04
31TYPO

Brian Kernighan’s name is spelled incorrectly - you have Kernigham.

2009-06-16
67TYPO

“I’m imagining a UI will with 3 text fields…”
should be
“I’m imagining a UI with 3 text fields a”

2009-06-15
65OK

As I’ve wrote in the forums, it would be nice to add how initWithCoder, initWithNibName and awakeFromNib fit into this whole lifecycle and what they’re supposed to be used for, maybe together with a graph of the lifecycle; also, information about which of these methods require a call to super and which don’t would be useful.

2009-07-02Section 2.5 (Anatomy of an iPhone Application) mentions that initWithCoder is called when an object is deserialized from the nib (you might intuit that this must occur before viewWillLoad and viewDidLoad). awakeFromNib is not used anywhere in the book as of b14.0 (it exists, but is more typical of Mac programming, IMHO), so we're leaving it alone. Finally, initWithNibName isn't a lifecycle method at all: it's used to programmatically create ViewControllers, as seen in the File I/O chapter's example.
207TYPO

Comment in code that reads:

‘if pervious failure count’

Should read:

‘if previous failure count’

2009-07-15
71TYPO

" connect the button to the edit action method"

should be (“done” in place of “edit”)

" connect the button to the done action method"

Because we declared this method

- (IBAction)done {
\t[[self parentViewController] dismissModalViewControllerAnimated:YES];
}

2009-06-15
141SUGGEST

It’s not clear if you actually want the reader to implement either of these file reading techniques or are just offering then for discussion. It’s also confusing to suggest that you could deal with a binary file simply with the other one-line call provided when it returns a data type that is not compatible with the property of the object we are using to display the file.

2009-07-14
145ERROR

You tell us how to write the setUpAsynchronousContentLoad method, but you never tell us where to call it from, or how it gets called if it somehow happens automatically.

2009-07-15
215ERROR

The XML parse may crash if currentElementName hasn’t been assigned the first time parser:didEndElement:namespaceURI:qualifiedName: is called. Fix is to set currentElementName = NULL; in parserDidStartDocument:

2009-05-05
141SUGGEST

I just spent 6 hours debugging my attempt to use the stringWithContentsOfFile: method. It was coming up with empty file contents. After learning how to use NSError, NSDictionary, and enumerators, I was fed the error key “NSFilePath” by the OS, with a value of my file path, which was a valid file. By more-ing the file in Terminal, I realized it has some non-ASCII characters in it. It would be nice if you mentioned that this call will actually return nothing when given a binary file, and that the only non-binary file available to be viewed is PkgInfo.

2009-07-14
144SUGGEST

Your view design for the file contents includes a field for the size of the file. There is no mention of this in the text whatsoever. I see in the sample code that the implementation behind it is an exact duplicate of the file size code in the file overview controller. This is redundant and that makes it confusing. When I first tested my code, I thought it was broken b/c it didn’t update the file size. Then I thought maybe I was supposed to pass the file size info somehow from the Overview to the Contents, since it had already been determined.

I suggest you remove this field from the view design, and remove the associated code from the sample.

2009-07-15
138ERROR

At the top, the code for DirectoryViewController.m is displaying an if-else statement. The statement is correctly closed with a curly brace, but then an extra } is required to close the entire function.

2009-07-02
32SUGGEST

I think it would be a good addition to this chapter to point out the Research Assistant (which can be found under Help in Xcode). It is of great, great value to people like me who aren’t that with Objective-C or Cocoa, and it helps a LOT in figuring out what you’re doing. It provides just that little bit of extra information to make bits fit together. Give it a thought!

2009-07-02
139TYPO

All the way at the bottom: “It provides the
method fileAttributesAtPath:traverseLink: method, ” 2x method.

2009-07-02
75TYPO

Figures titled MovieEditorViewController should be titled MovieViewController

2009-06-15
71ERROR

Need to mention that you also need to (re)connect File’s Owner to the View object.

2009-06-15
142SUGGEST

The text refers to the figure as a guide for creating the view for the contents controller. I’m assuming we are supposed to use the View XIB template for this. The corresponding empty view we get does not account for the space that the navigation bar takes up. If we fill the view with the text field, even leaving the space indicated by the guides, we end up with a scrolling text field who’s bottom we cannot see; if you view a file that does not fit on the screen, and scroll down to see the end of the file, you can pull the last line into view, but it “spring” back out of view when you let go. We can of course just leave some extra blank space below the text field, but I would think there is a more formal way to build a view that needs to account for the space that a nav bar is going to take up.

2009-07-14
150SUGGEST

The description of the new controller we need uses confusing terminology and non-obvious design. It doesn’t make sense to say a controller “has” a button, graphical elements in MVC belong to views. Similarly, it doesn’t make sense to say that a button “does x, y and z.” All a button should really do in MVC is call a method on a controller. The controller is what’s really doing all that work. I apologize if it sounds like I’m being pedantic, but I really had to struggle with this passage before I got it sorted out in my head and was then able to make these comments. Finally, it is not clear why we are creating the save button in code when we are building a whole view from scratch just for this. Why are we not creating the save button in IB?

2009-07-15
151SUGGEST

The following english is weak, misleading and inappropriately subtle: “Notice that we also need to alert the previous DirectoryViewController (a property in this class) to reload the directory contents and update its table view before we navigate back to it.”

“Notice…” makes this whole thing a caveat, when really it needs to be it’s on paragraph. You need to be decisive - instead of suggesting I notice something, tell me what I need to do. The parenthetical bit about the property needs to be the same way - tell me what to do and where. Also, “previous DirectoryViewController” is redundant and therefore inaccurate - “previous controller,” or just “the DirectoryViewController.”

For example, “We need a property in this class pointing to the DirectoryViewController, so we can alert it to reload its contents and update its view before we pop this view and return to it. We set this property .”

2009-07-15
149SUGGEST

wishy-washy: “Notice that the method takes a variable number of argu- ments for the ”nor mal" buttons, and requires you to provide a final NULL argument to end the list of button titles. You also provide a delegate which will receive an actionSheet:clickedButtonAtIndex:5 callback."

You shouldn’t tell me to “notice” this; at best it adds nothing, but really it implies I could have guessed how the API works. You are the expert, I’m the student, just tell me how it works.

2009-07-15
149SUGGEST

vague and incomplete: “You also provide a delegate which will receive an actionSheet:clickedButtonAtIndex: callback.” This should be an instruction, not a commentary.

But what’s much more important is that there are almost 60 lines of code behind this single sentence. It is not reasonable to expect the reader to guess that there is that much work to be done entirely on our own volition. If you don’t want to discuss that code, that’s fine, but at least point out that we should look at the implementation in the sample code. Personally unless you tell me to go to the sample, I assume (especially based on your training wheels comment earlier) that I am supposed to be able to figure everything out on my own that you do not spell out.

2009-07-15
253TYPO

Text currently reads:
contact and be prompted to attache a photo from
your library

“attache” should be “attach”

2009-06-15
253SUGGEST

I have noticed numerous places where there is no comma after an introductory adverbial phrase - I believe there should be one and the pause I naturally make while reading it reinforces that belief.

Example on pg 253:
As is often the case the hard part is …

I believe there should be a comma inserted after the word ‘case’.
As is often the case, the hard part ….

2009-07-15
1SUGGEST

One of the things that is the hardest for me to understand in the example applications, is how all of the objects fit together; what does the whole architecture look like, and why. Who creates this controller? Why is this one in the NIB, and this one outside it? Why is the title for this controller set here, and for that one there? And so on.

Often after reading a chapter I take a sheet of paper and draw a diagram of all the objects, grouped in NIBs and connected with arrows - this helps me understand how it all works on the higher level. I’m thinking it would be good if the book included such high-level analysis sometimes, possibly with some small diagrams (I’m not talking about 5 pages of UML, just a few boxes and arrows). After reading a few chapters, I may know very well how to create a NIB or controller and how to connect stuff, but I don’t always understand WHY I am supposed to do this. How do I start, how do I plan how the application is built, what it will consist of… it’s not easy to figure this out by yourself.

2009-07-15We did not add the diagrams you've asked for but we have gone back and added more prose to explain what is going on and have annotated many of the existing diagrams.
280TYPO

The correct name must be movie.m4v, NOT video.m4v as stated here:
The downloadable sample
assumes you’ll drop a single MPEG-4 file2 called video.m4v into your
project file to add it to the application bundle.

Also, this example has memory leaks that I cannot figure out. I’ve used your code and quadruple checked it but it still leaks. HELP ME, Please???

I tried stripping out everything but the media player and it still leaks??

What am I missing?? It is a very frustrating thing to get this far and hit this stone wall!

martygerman@mac.com

2009-07-02Fixed the typo. We'll look for a memory leak during a final pass over all the code examples soon. Have you looked to see if it's still leaking with iPhone OS 3.0?
134OK

It’s nothing important really, but in the second listing, you could synthesize the property and then override just the setter and have the getter implemented for you.

2009-07-02True, but the idea of doing your own property implementation is tricky enough (as an aside, no less), in a chapter that's already gotten a lot of complaints for its difficulty, so this is something we probably won't add to the mix.
138ERROR

“We also need two IBActions” -> only one of the two methods is an IBAction.

2009-07-02
64TYPO

second paragraph, fourth sentence: “To do that we are going to over -
ride the viewDidLoad method in the MoviewViewController to create a new
instance.”

Movie[W]ViewController!

2009-06-15
75TYPO

Very last sentence: “identify inspector” = “identity inspector”.

2009-06-15
151OK

(maybe this isn’t a technical error, but if not, then that fact deserves discussion): It seems dangerous to use an internal data structure as the basis for a destructive action that came from a UI index. In this application things may be simple enough to be sure that the UI table and our directoryContents array are in sync, but I have to imagine that there is a way to read the actual visible table row’s contents, and either use it as the base for the destructive action, or at least confirm that it matches our internal data before resorting to using that.

2009-07-15No more dangerous than MVC ever is, I'd say. The array is the model, the UITableView is the view, and the DirectoryViewController is the model that mediates between them. If you want to find a way around the controller and desync things, I think you've left the realm of MVC altogether, because you're now talking about multiple objects mediating between the model and view. Since the table is a public property (by convention for IBOutlets), this may well be possible, but I think it's an academic concern, and delving into it (in an already hard chapter, as you've noted) would not be useful, IMHO.
159TYPO

pp159, ver B13.0

Missing Word: “of” => …. get a list “OF” know time zones …

In FlipsideViewController.h, add the protocol declaration<UIPickerViewDataSource,
UIPickerViewDelegate> to the end of the @interface statement.
Then in the implementation file, you’ll need to get a list known
time zones from the NSTimeZone class method knownTimeZoneNames, via
a loadTimeZoneNames method that you can call from viewDidLoad.

2009-07-02
93SUGGEST

Instead of using an NSIndexPath, why not use this instead:

[self.tableView reloadData];

???

2009-06-16
66TYPO

In »You should see the title of the move that you choose appear in the text fields including a dollar sign in the box of fice gross field.« is a typo: »move« should be »movie«.

2009-06-15
99ERROR

In the first code block on this page, line 9, is “cell = teamCell”. teamCell has not been defined yet.

2009-06-16
60SUGGEST

You write if nil != self: I think self != nil is the (much) more common idiom.

2009-06-15Hi Michael, \n \nThe nil != self idiom comes from a book called Code Complete (http://www.cc2e.com). The idioms in that book, including this one, have saved me countless hrs of head scratching.
88TYPO

Our AddTeamViewController view needs a title and a button to get back to the list of teams. Search for “Navigation Item” in the Inter face Builder library.
— Navigation Bar, not Navigation Item

2009-06-16
54TYPO

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.

57TYPO

“Drag from the little circle to the left of ’Touch Up Inside’”

little circle is to the right of ‘Touch Up Inside’

2009-06-15
66TYPO

The text says “you should see the title of the move that…”. “move” should be “movie”.

2009-06-15
75SUGGEST

Section 3.7 »The Editing View Controller in Interface Builder« was horrible to read. I’ve read the section 10+ times and just don’t get it. Successful I was only by inspecting the code from the website. I’ve to manually inspect the XIBs in the project.

So please rework that whole section, it’s too confusing (by the way, the figures doesn’t match the text too).

2009-06-15
89ERROR

In the third paragraph where you talk about creating the connection between the UI interface elements. There’s a sentence like »Control-Click the File’s Owner to bring up its
list of outlets, select the navigationItem outlet, and connect that to the “Navigation Item” icon in the xib document window.«

But there’s no navigationItem outlet. And IMHO there shouldn’t be one, because a ViewController isn’t the same as a NavigationController.

So this is a dead end, there’s no way to proceed.

2009-06-16
88ERROR

»Drag an instance into our AddTeamViewController document window. Then set the title of the Navigation Item to “Add Team” in the attribute inspector.«

Should be »Drag an instance into our AddTeamViewController view windows, instead of document window.

2009-06-16
61TYPO

The sentence of the last paragraph:

So in this case we set the property to nil which first releases the
existing object then assigns the instance variable to nil—well actually
its a copy of nil, but any message sent to nil just returns nil).

ends with a ‘)’ parenth that shouldn’t be there, unless it’s missing the open parenth.

2009-06-15
108ERROR

This section needs a lot of work. The cabinetController isn’t explained here. In the second last paragraph it urges me to implement the cabinetController property but I don’t know anything about a cabinetContoller at this point.

2009-06-15
111ERROR

»Basically you can replace the UITextField that is used by default to draw the titles with a view of your own that draws anything you want into the title area.«

Is it really an instance of UITextField? I think it’s more likely that it is an UILabel.

2009-06-15
390TYPO

“While it is great to be able to reuse these other applications via this mechanism. It does cause” -> “… this mechanism, it does cause”

2009-06-15
391TYPO

“Mail supports the full mailto URL scheme documented here Mail URL Schema” -> missing link?

2009-06-15
391TYPO

“’full text search’ for ”URL Scheme Reference“. . ” -> two periods at the end

2009-06-15
393TYPO

“not that the app needs that its just for illustration” -> “…needs that, it’s just for illustration” ?

2009-06-15
394TYPO

“if you enclose the URL is angle brackets … the system
will understand that its a link” -> “… IN angle brackets”, " … IT’S a link"

2009-06-15
436TYPO

“ad-hock distribution” -> ad-hoc

2009-06-15
76SUGGEST

I did not understand the following until carefully comparing your example xib files with mine:
“All that remains is to make the connection from the File’s Owner to the new view controller.”

Better (as far as I understand now…): "… make the connection from the File’s Owner editingViewController to the new view controller instance .

Also, I recommend to rename MovieEditorViewController to EditingViewController in order to make reading the text easier. (Since the names are so long the already a little confused newbie reader may easily mix them up.)

2009-06-15
86SUGGEST

I’d like to see a comment why you add the UIBarButtomItem in code instead of using IB.

Trying it myself, it appears, it is not (easily) possible the way the Navigation based Application templates are set up. But why…

This might be something for Joe to ask.

2009-06-16
122TYPO

In the first paragraph it should be objectAtIndex: (or more exposed objectAtIndex:valueForKey:).

2009-06-15
122TYPO

Last paragraph, second sentence has a type at »This view i swell […]« should be »[…] is well […]«

2009-06-15
75TYPO

The image shown is MovieEditorViewContrroller.xib. The correct image to show with new view controller is MovieViewController.xib

2009-06-15
69SUGGEST

The use of NSNumberFormatterCurrencyStyle makes the example overly complicated. Please explain that only numbers proceeded with a “$” can be used when editing the boxOfficeGross.

2009-06-15
89TYPO

The a second screen shot on page 89 is needed to show “Control-Click the File’s Owner to bring up its list of outlets, select the navigationItem outlet, and connect that to the “Navigation Item” icon in the xib document window" It is no clear from the text what to do.

2009-06-16
124ERROR

By the time I complete section 6.3, I can launch successfully, but the first tab, “By Population”, which is pre-selected won’t actually show anything. The second tab does show by area just fine. I launched the sample “States” project (not “States More”) and it has the same problem. It seems like we need to force the first tab to reload it’s table upon activation, or something of that sort.

2009-06-15please post to the forums and I'd be glad to try to help
124SUGGEST

Per my previous posting about the by population not showing, the example code and the book forget to mention that the delegate and/or data source of the view needs to be wired back to point to the controller. When I did this, all was good.

2009-06-15
148TYPO

Figure 7.7: Dispaying a UIActionSheet for file actions —> Displaying

2009-07-02
68ERROR

When using viewWillAppear:animated the movie data is not displayed the first time you click the edit button. Changing it to viewDidAppear:animated worked for me. (I’m using the b5 of the iPhone OS 3.0 SDK if that matters)

2009-06-15make sure you are setting the movie object before you push the view controller in your edit method.
92ERROR

The first code example:

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;

should be

- (BOOL)textFieldShouldReturn:(UITextField *)teamTextField {
[teamTextField resignFirstResponder];
return YES;
}
}

2009-06-16
129SUGGEST

This is the first mention of UITextView, but it isn’t explained here. Perhaps a short descriptions would be good.

2009-07-02
66ERROR

The text in this section doesn’t mention that you need to add a #include “Movie.h” statement to the top of MovieViewController.m

2009-06-15
432SUGGEST

If you add -V option to scan-build, it will automatically start the server and open the page in your web browser.

2009-07-02
416SUGGEST

You could also mention that the Clang analyzer, described in next chapter, can be very useful for finding such errors like “one release too much” - and it’s probably faster than enabling zombies and looking through the logs.

2009-07-02
59TYPO

I am marking this as a typo, but am unsure if it’s a discrepancy between SDKs. I am following along using the new SDK 3.0 GM and when I follow the instructions to add the “NSObject subclass” on page 59 of the PDF, my options under the new SDK are completely different and the window now has additional options that as a beginner I wasn’t sure how to use. As a matter of fact, the NSObject subclass wasn’t listed at all.

2009-06-15
66ERROR

For the Build-and-Go to work on P66, you need to also import the “Movie.h” headers into MovieViewController.m. The code available for download is correct and has the import statement, but it is not mentioned anywhere in the code.

Minor really, but the book thus far has included everything you need!

2009-06-15
201TYPO

“hierarchal” should be spelled “hierarchical”

2009-07-07
197TYPO

“However, if you are one of the majority developers for which SQL is just not that exciting then you are in luck.” should be something like “However, if you are in the majority of developers for whom SQL is just not that exciting then you are in luck.”

2009-07-15
206ERROR

“Recall that the Documents directory is the only write-able space we have access too from within our applications.” — the word “too” should be “to”. “write-able” doesn’t need a hyphen. Also, that’s not accurate. You can write to the caches directory as well by using NSSearchPathForDirectoriesInDomains() with the NSCachesDirectory constant.

2009-07-07
217TYPO

“In addition to making it really easy to populate the table view, the FRC also manages memory very agressveily” — “agressveily” should be “aggressively”

2009-07-07
221TYPO

“Being a pro at table view’s by now” — the plural form of “table views” has an unnecessary apostrophe.

2009-07-07
198TYPO

First paragraph: “API’s” should probably be “API”.
Second paragraph: “track’s” should probably be “track”.

2009-07-07
26TYPO

tools to navigate the code with. -> tools with which to navigate the code.

2009-07-07
447TYPO

The code comment says 25 meters, but the code and text say 20 meters.

2009-07-07
447TYPO

The timeDelta method isn’t explained and it’s code can only be found in the online resources.

2009-07-15
310SUGGEST

Rather than using the NSFormatter’s stringForObjectValue, it’s far simpler to use a method like the following:

+ (NSString *)stringFromTimeInterval:(NSTimeInterval)timeInterval {
\treturn [NSString stringWithFormat:@"%d:02d", (int)timeInterval / 60, (int)timeInterval 60];
}

I have this declared in a category on NSString, called with [NSString stringFromTimeInterval:timeInterval].

2009-07-06Yep, much as I'd like to get in NSFormatter somewhere, it's a real sidetrack from the media stuff, and a simple formatted string is much more sensible here. Thanks. We're changing it in both the iPod and AVFoundation chapters.
311OK

currentTimeUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
target:self selector:@selector(updateCurrentiPodItemTime)
userInfo:NULL repeats:YES];

Should this read ‘scheduledTimerWithTimeInterval:1.0’ ?

2009-07-02No. 1.0 would check once a second, so the displayed time could be as much as 0.999 seconds off. By updating every tenth of a second, we're more accurate. Yes, it's pedantic, and you might choose to update less frequently in a real app if you need the cycles elsewhere.
27ERROR

“If it’s easier to find what you are looking for
from an alphabetically ordered list you can hold down the option key
and click on the symbol list, then Xcode will display the symbols in
alphabetical order.” — For me, it’s the command key, not the option key.

2009-07-07must be a preference, its option in the default config
199TYPO

How nitpicky is this? The screenshot contains a typo: “Macs” shouldn’t have an apostrophe. Really.

2009-07-07
89TYPO

• UITableViewCellStyleValue1: A large right-aligned black textLabel on
the left, and a slightly smaller left-aligned detailTextLabel on the
right in blue. This layout resembles cells in the Settings applica-
tion.

I think the large black text is left-aligned and the blue text is right aligned.

2009-07-07
225TYPO

In the first sentence of the second paragraph on the page. Should makign be making?

2009-07-07
492DEFER

As far as I can see, this chapter does not directly address the interpretation of crash logs. Because we may get crash logs from Apple, once an application has been released to the field (even in a beta testing mode, I think), it might be good to cover this. I would include a discussion of just what needs to be done to prepare the application for usable crash reporting, and what to do with a crash log once you have it.

Too big a task for this edition, but we'll keep it in mind for the next. Thanks.
457SUGGEST

I’d think using the MAX and MIN macros would help readability here

2009-07-07perhaps, but I don't think enough to merit a change
396SUGGEST

I recommend changing the title of section 19.4 from “Video” to “Captured Video”, to clarify the Table of Contents.

2009-07-07
448SUGGEST

I recommend elevating “Compass” to a numbered section (23.3). The compass is returning orientation information, so geometrically it is more closely related to the accelerometer than to location. It only belongs in Chapter 23 (as opposed to Chapter 21) because Apple made it part of the Core Location framework. A numbered section better reflects this dichotomy, and makes the compass visible in the Table of Contents.

2009-07-07
440TYPO

In the last full paragraph, change “it’s delegate” to “its delegate”.

2009-07-07
442TYPO

In the first full paragraph, change “it’s delegate” to “its delegate”.

2009-07-07
444TYPO

In the first boxed paragraph, change “it’s position” to “its position” in each of the last two sentences.

2009-07-07
444SUGGEST

In the box, change “the 3G iPhone has” to “almost every iPhone has”. It is likely that future iPhones won’t be properly described by “the 3G iPhone”, but will have GPS.

2009-07-07
459DEFER

The TouchXML bit seems out of place. Reading through the examples, I’d really rather see the part about “Selecting an annotation” before running off about geocoding.

2009-07-07Thanks Thomas for taking the time to post! \n \nWe do cover 'selecting an annotation' in the chapter but I'd be happy to add some detail to that section for you in the next edition.
24TYPO

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];

2010-10-16
164TYPO

In the paragraph preceding the code snippet for MainViewController.h, the reader is directed to add #defines to RootViewController.h as opposed to MainViewController.h.

2009-07-02
452TYPO

“Its in the ’Data Views’ group, here is a screen shot of the library with Map View selected.”

Its should be It’s, and the comma is grammatically incorrect, suggest emdash or semi-colon.

2009-07-07
69TYPO

After the code example there are two paragraphs which read:

“Now that we have our inter face defined, let’s build the implementation.
The first thing to do is import the Movie.h, for every class forward dec- laration you do in the header file you almost always have to import the header file for that class in the implementation file. The next thing to do is to add the synthesize statements for each of
the properties. I always put these statements at the top of the @imple-
mentation block so I usually do that first when building a new imple-
mentation. ”

This looks like it belongs on pdf page 67 near the top of the page

2009-07-07
298TYPO

The text says that the video file should be named “video.m4v” for the sample code, but the sample code looks for a file named “movie.m4v” (in the pathForResource:@“movie”) portion of viewDidLoad.

2009-07-02
128ERROR

I’m running iPhone 3.0 in the simulator, and the line " [cell autorelease]; " kept crashing the application. Worked fine when I commented it out.

2009-07-07
459SUGGEST

The section on TouchXML and the AddressGeocoder seems to be unfinished.

It only describes at length how to include the TouchXML but not about the AddressGeocoder implementation using TouchXML.

Also, I’d like you to elaborate on why you’ve chosen TouchXML this time versus NSXMLParser. The presented argument (we only need bits of information) by itself is not so convincing since in chapter 11 you were also only interested in partial information.

2009-07-07
102TYPO

“rewrite the if (cellnull)" should be " rewrite the if (cellnil)”

2009-07-02
102TYPO

“On line 2 is that we load the Movi-
eTableCell nib” probably should read “On line 2 is where we load the Movi-
eTableCell nib”

2009-07-02
35TYPO

In the footer: “… Xcode appends the project name to the filename, like HelloUser-Info.plist …” The correct jargon is “prepends,” not “appends.”

2009-07-02
64ERROR

“As you learned in Section 2.7, Managing
Application Memory, on page 50 a property that copies or retains its
object value will first release the old value before assigning the new
value. …”

actually that wasn’t made clear (and it was p53 in the PDF). Would be worth an extra paragraph, objC is great but memory management is still pretty scary.

2009-07-02The release is mentioned in the "Accessing Variables as Properties" section on page 53: "However, you can also use retain to send a retain message to the object being set (ensuring that your object will be an owner of it), while also release-ing any previous value."
97ERROR

Text: Select the bar button, bring up the Identity Inspector
(D1), and change its style to “Add”; this will change its appearance to a simple plus-sign (+).

Should Read: … and change its identifier to …

2009-07-02
101TYPO

Text: open MainWindow.xib, find the table

Should Read: open RootViewController.xib, find the table

2009-07-02
33TYPO

“The Cocoa Touch application frameworks (…) contains most of the classes …” - frameworks contain, or framework contains

2009-07-02
124TYPO

“crated for us by the template” should be “created for us by the template”; although it is an interesting (and acceptable) statement! :)

2009-07-07
97ERROR

The sentence:
Select the bar button, bring up the Identity Inspector
(D 1), and change its style to “Add”; this will change its appearance to a
simple plus-sign (+).

Refers to changing the style of the button to Add, which is not an option. The correct sentence should read:

Select the bar button, bring up the Identity Inspector
(D 1), and change its identifier to “Add”; this will change its appearance to a
simple plus-sign (+).

2009-07-02
212TYPO

the middle of the paragraph reads:

choose the checkbox next to Session and Target

I think it should read:

choose the checkbox next to Session and Track

2009-07-07
213TYPO

After you click the next button…
should be:
After you click the Finish button

2009-07-07
419TYPO

Seems to missing the method header for accelerometer:didAccelerate (I believe other examples in the book have the header)

2009-07-02
71TYPO

Missing apostrophe in sentence near the bottom of the page:

“The text field del-
egate protocol is very similar to the application delegate protocol in that
methods are sent to the delegate during interesting points in the text
fields life-cycle.”

This should read “… interesting points in the text field’s life-cycle.”

2009-07-07
64TYPO

“assigned self to [super init]”
shouldn’t it be “…. assigned [super init] to self…”? Which seems more logical for assignment reading.

2009-07-15
164TYPO

Line #3 under the shaded box, “In RootViewController.h, we’ll #define….”

There is no “RootViewController.h” file, It shall be “MainViewController.h”.

2009-07-02
181SUGGEST

This page mentions to a script name “make-table-script”, but it is not in the “DatabaseShoppingList” folder. It is in the “OldDatabaseShopingList” folder. You may want to have this file in the lastest project folder as well.

2009-07-02
166ERROR

The FlippableClock example works perfectly fine in the simulator. However, if installed on the iPhone (OS 3) the 24h setting will be ignored. The application is allways displaying the time in whatever format was set in the iPhone date & time settings.

2009-07-02Ah, sorry. We had a footnote about this in previous betas, but mistakenly cut it out when rewriting this chapter for 3.0. The actual device behavior is that the app's formatting works if 24-hour is turned off in the System Settings app. If 24-hour is ON in the system settings, that overrides what we're trying to do with the NSDateFormatter here. We'll restore the explanation in the final edition.
19ERROR

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.

83TYPO

4.2 Setting up a Table-Based Navigation

Either the “a” should be deleted, or you need to add something to the heading. I’m betting the former, i.e., that it should read:

4.2 Setting up Table-Based Navigation

2009-07-02
99OK

The footnote is truncated on my edition and ends at “The previous”

2009-07-02In beta 14, the footnote continues on page 100.
193ERROR

Example application generates an EXC_BAD_ACCESS when viewing the “List by Price” tab for a second time. This is because the code listed on Page 193 creates an autoreleased NSDate object called dateValue using an NSDateFormatter, and then explicitly releases it. Please remove the release call.

2009-07-02Nice catch! Thanks!
209TYPO

Line #4, “When you have added all three”
It should be “When you have added all two” since we only add “name” & “trackAbstract” here.

2009-07-07
79TYPO

All that remains is to make the connection from the File’s OwnereditingViewController –>All that remains is to make the connection from the File’s Owner to the editingViewController

2009-07-15
24TYPO

In the last paragraph of section 1.3 a line reads “The simulator rotates the device
left of right by ninety degrees and the text rotates along with it.” Should be “left OR right”.

2009-07-07
77TYPO

Para 2 of section 4.6 begins: “In Interface Builder let’s create a new interface…” Should be: “In XCode let’s create…”

2009-07-15I cant find this in the book. Pg 77 is in section 3.5 in the PDF.
113ERROR

In the example code:

- the UITableViewCell is created with older CGRect rather than the style.

- The UITableViewCell’s text property is deprecated.

2009-07-07
119ERROR

I can’t quite tell what is going on with the UIBarButtonItem. The code is not mentioned in the narrative, and does not seem to actually do anything in the simulator.

2009-07-07
170TYPO

“dno’t need one” should be “don’t need one”

2009-07-02
94TYPO

You tell the user to add the ivar, property, and synthesis, but you don’t mention the need to import the newly added MovieEditorViewController header file.

2009-07-02
64ERROR

In all the rest of the code samples your convention for function declarations seems to be (return type)functionName… with no space between the return type’s closing parenthesis and the funciton’s name, however the dealloc function declaration at the top of this page strays from this convention. Not a big deal, but thought I’d point it out for you anyway.

2009-07-15Thanks Ryan, \n \nThat method is typically built by the template and usually not modified. \n \n
65TYPO

In the second paragraph: “This is the similar to what you just did in the Movie class.” should read “This is similar to what you just did in the Movie class.”

2009-07-15
94TYPO

You say : “Also copy over the
MovieEditorView.xib and add that to the project’s “Resources” group.", I guess you should mention MovieEditorViewController.xib instead of MovieEditorView.xib

2009-07-15
72TYPO

In the second paragraph after the first chunk of code: “In the done method we dismiss the current model view controller with
a call to the dismissModalViewControllerAnimated.” should read: “In the done method we dismiss the current modal view controller with
a call to the dismissModalViewControllerAnimated.” (we are dismissing the MODAL view controller, not the MODEL view controller).

2009-07-07
73SUGGEST

“Since this one view controller is playing the part of delegate for each
of the text fields we need to distinguish which one was typed in so we
know which property of the movie to update.”

In the code example you run through an if..elseif chain to figure this out, but then neve use the “textField” parameter, instead you just assign the values from each UITextField property of self to each corresponding property of self.movie. The if…elseif chain is redundant. The code should either use the passed in textField’s text, or do away with the if chain and just update all properties with their corresponding textField.

2009-07-07if textField == self.summaryField then it is equiv
211TYPO

First line: “Select the Session entity and add a relatationship,
name it ’track’.” The word “relationship” has a typo.

2009-07-07
127TYPO

I’m running Xcode 3.1.3. In this (States) and the previous example App you ask the reader to choose UITableViewController subclass. That option is not available in my 3.1.3 Xcode version. However it is available in 3.1.2. Any suggestions on how to proceed? Also do you know know why the UITableViewController subclass was dropped?

2009-07-07
127TYPO

Ah, they changed the interface. To choose UITableViewController subclass, You must fist select Objective-C class, the a drop-down men appears from which you can select UITableViewController subclass. Sorry about that.

2009-07-07
129SUGGEST

In footnote 2. “Placing the table view as a child of the ByPopulationViewController automatically makes
this table view the view for that controller so we don’t have to do any connections.” I assume this means placing the table view under or “on” the ByPopulationViewController. When I did this it did not automatically connect dataSource and delegate. I had to manually make the connections. I’m using Xcode 3.1.3.

2009-07-07
138ERROR

This may be a bug in Xcode but #import “RootViewController.h” in FileSystemExplorerAppDelegate.h doesn’t get refactored. Also as expected, the comments did not I get refactored either.

2009-07-07
127ERROR

Jun 17 version, page 127. In the example code for ByPopulationViewController.m when a cell is created it is autoreleased twice, resulting in a crash when attempting to reuse it.

For people reading the errata and wondering how to fix the crash, simply remove one of the autorelease statements.

(To see the crash, simply run the States example, scroll so a couple of items are out of sight, then let go.)

2009-07-07
252TYPO

At the end of the third paragraph on this page is the following sentence:

This element’s has child elements that describe
the user: their ,, , and so on.

Should be: (removed the ’s from element’s)

This element has child elements that describe
the user: their ,, , and so on.

2009-07-15
113ERROR

In the switch statement, you set :
cell.text = @“Home”;
-> cell.text is deprecated in favor of cell.textLabel

2009-07-15
113TYPO

In the last erratum, I meant :
In the switch statement, you set : cell.text = @“Home”; -> cell.text is deprecated in favor of cell.textLabel.text (I forgot the .text after .textLabel)

2009-07-15
120TYPO

cell.text = [[data valueForKey:self.key] objectAtIndex:indexPath.row];
should be
cell.textLabel.text = [[data valueForKey:self.key] objectAtIndex:indexPath.row];
(cell.text is deprecated)

2009-07-15
212ERROR

This is covered in the forums, but I will put it here for completeness. The PDF says to Control-click on the Classes group then choose Add -> New File… and to choose Managed Object class.

You actually have to click on the Conference.xcdatamodel in Resources then on one of the entities. Then choose File -> New File… in order to see Managed Object class in the Cocoa Touch Class section.

2009-07-15
267TYPO

at the bottom of the page, where it states: “it does not directly use the Bluetooth APIs, as covered in Section 12.1,”

I think it should say : “it does not directly use the Bonjour APIs, as covered in Section 12.1,”

2009-07-15
94SUGGEST

Enter a description of how to add the MovieEditorViiewController.xib - I tried using default procedure which ended with a mess of files in the resources “folder” of the project viewed in Xcode.

Created a new project and added the xib but with “Create Folder Ref…” instead of the “Recursively …”. If I did some other mistake that you can identify, warn the reader of that.

2009-07-15
101SUGGEST

Hi,
In the paragraph starting “Now, back in Interface Builder…”, that continues into page 102, I can’t seem to follow the logic to make the connections in Interface Builder. I’ve tried a few different things but am unable to figure out which nib file needs to be open and how to make the connection from “the nibLoadedCell outlet to the cell object in the nib window”

any help or further explanation is appreciated.

thanx

david.maharaj@gmail.com

2009-07-15
217TYPO

aggressively misspelled

“FRC also manages memory very agressveily”

2009-07-15
380SUGGEST

It is counter intuitive to have a graphic plopped in the middle of a code block. The graphic should be placed either before or after the code block, not inside.

2009-07-15
286ERROR

In the example code for (void)touchesBegan

CGPoint location = [touch locationInView:self];

generates a compiler warning and eventually fails.

CGPoint location = [touch locationInView:self.view];

corrects the problem. This same problem occurs on the example code in the next page.

2009-07-15Hi Matthew, \n \nCould you take this to the forums. It does not make sense to ask a view for its view.
97TYPO

Second paragraph, first sentence: “we’ll user Interface Builder to open” -> “we’ll use Interface Builder to open”

2009-08-20
298TYPO

The PDF TOC shows “Communicating Via the 4-1GKSession”, I guess this “4-1” should just be removed.

2009-12-10
245TYPO

Very minor: Text “On line 11 is where we do….” should probably state “On line 10 …”

2009-08-19
69TYPO

Apostrophe missing?
“In iPhoto its classes like Photo or Album.”
Should perhaps read “..iPhoto it’s classes…”
The two sentences starting with In iTunes & In iPhoto are a little odd. Consider revising them.

2009-08-20
22TYPO

I call it my “All Along the Watchtwower” (Looks like that was supposed to be Watchtower)

2009-08-20
365ERROR

The system sounds demo crashes. SystemSoundsDemoViewController.m line 132 tries to open a .aif file and should be .caf instead.

2009-08-20
197TYPO

…“be a pain in the neck to manually switch your thinking back and fourth.”

The last word should be “forth”.

2009-08-20
225TYPO

First paragraph under 11.4 Modeling
…lets start fleshing out our application but building our managed
object model. should be .. by building our managed object model.

2009-08-19
23TYPO

“From Bill Dudney
Writing a book is a big task. But of course its not just the authors”

its -> it’s

2009-08-20
24TYPO

“from location to the accelerometer—from view controllers to
core animation”

The em dash is used to indicate interrupted speech, to indicate a long non-expositional verbal pause or to posit a reinforcing subscript. In dicolon and tricolon, use comma instead.

s/—/,/

2009-08-20
25TYPO

“It’s filled with really cool technology that just makes you want to create.”

‘Just’ is ancillary. This is also spoken in the first person.

2009-08-20
25TYPO

“But in this chapter we are going to introduce you to
the tools and the basic development cycle for the iPhone.”

Sentences may not begin with conjunctions; there is nothing on the left to be conjoined. Omit ‘but’.

“we will” is preferred to “we are going to”, as going to implies a physical location.

“of the iPhone”, not “for the iPhone”, as the iPhone is a class of objects, rather than a single object.

2009-08-20
25TYPO

“Our first application is purposefully overly simple.”

Overly in this context suggests “moreso of the characteristic than is desired or admissable.” The sentence as such says “this example is simpler than it should be.” Omit ‘overly’.

2009-08-20
25TYPO

“You’ll first check that you have all of the developer tools you need installed and then use two of them to create and run your application in the iPhone simulator.”

Technical writing eschews contractions; prefer “you will”. Also, this is a run-on; add a comma after “installed” to meter the sentence.

2009-08-20
25OK

“Because this is an iPhone app, you’ll rotate the text when the device is turned sideways. Finally, you’ll download this
application and run it on your iPhone.”

More contractions.

“2.1 Gearing up”

Headers are in title case, not sentence case. “Gearing Up.”

“If you are already developing applications for Mac OS X, then you are familiar with Xcode, ”

“Should be”, not “are”: you cannot determine knowledge empirically by context this way. Indeed, personally I am a counter-example, as I write pure-c Mac applications in MSVS which get cross-compiled by a linux box from subversion hooks.

Similarly,

“You will be able to breeze”

Should.

2009-12-07
25TYPO

“So if you are pushing to an iPod touch don’t feel left
out, we mean you too.”

Again, starting a sentence with a conjunction. Again, a two-fragment run-on; there needs to be a comma after ‘touch’. The comma which is present should be a colon: it’s a conjoined fragment. There should also be a comma after you if anything follows, and the use of ‘too’ there is slang; the proper way to say that is “we also mean iPods.” Turns out that very few of your readers were manufactured by Apple.

2009-08-20
123TYPO

Section 6.4 in the paragraph starting “The pushViewController:animated method is also …”:
The text “… and the back buttons title is replaced with …” should read “… and the back button’s title is replaced with …” - possessive s should have an apostrophe.

2009-08-19
127TYPO

The first paragraph of this page says to set the NIB Name to DVDCabinetController, but the DVDCabinetController.xib nib file isn’t set up until the following paragraph, so it isn’t available as an option.

2009-08-19
532TYPO

“Writing and ADS is not hard,” should be “Writing an ADS is not hard,”

2009-08-19
171ERROR

In the code “[self.tableView deleteRowsAtIndexPaths: deletedPaths
withRowAnimation: YES]” deletedPaths has not been created in previous code. Why not use the template line, which works fine.

2009-08-20deleteRowsAtIndexPaths:withAnimation: takes an NSArray* of paths to delete, and we omitted the line showing how this array is created :NSArray *deletedPaths = [NSArray arrayWithObject: indexPath];
131ERROR

The code for the States (and States more) Tab Controller examples appear to be broken. The user can compile with 2 build warnings (Both being the calls to the statesByArea and statesByPopulation methods), but no data will appear and the app will crash upon selecting the second tab. When the user attempts to compile and run the source code downloaded from the PragProg site, there are a number of build errors; all stemming from what appear to be UI elements. Thanks for the book; other than this, it’s been a great experience!

2009-08-19Hi Thomas, \n \nThanks for taking the time to report this. I'm unable to reproduce it though. Could you please take this to the forums so we can help sort it out? \n \nThanks again!
123TYPO

Last line of 3rd para - no apostrophe on possessive. s/b “…animating its arrival.”

2009-08-19
129TYPO

Same as 123 - its for it’s.

2009-08-19
267TYPO

The variable name for the spinner is activityMonitor here, then activityIndicator on the next page in the code.

2009-08-20
138TYPO

Screenshot appears to be the “after” example, not the “before” as suggested by its location on the page and the text.

2009-08-19
242TYPO

In 11.8 :
the other is the data about the track it’s self
->
the other is the data about the track itself

2009-08-19
86TYPO

Section 4.8 bullet point #2. There is a space missing between “MovieViewController” and “edit” in MovieViewControlleredit.

2009-08-19
105TYPO

I assume that “user” should be “use”:

“Now, since we need to work with the navigation objects that Xcode
created for us, we’ll user Interface Builder to open the MainWindow.xib
file, where they’re defined.”

2009-08-20
114TYPO

One too many “as”:

“To perform the sort, we’ll rely on the fact that the NSArray provides a number of methods to return a sorted copy of an array, and NSMutableArray offers as these as methods to sort the mutable array itself.”

2009-08-20
68OK

Dangling } from code on previous page.

2010-01-20
84TYPO

“when ever” (last sentence, PP begins with “One of the coolest…”) should probably be “whenever”

2009-08-19
42TYPO

In the footnote, you explain that info.plist includes the project name before “-info.plist”. Anyway, the example is HelloUser-Info.plist, but we haven’t made that project yet, this should probably be changed to Hello-Info.plist which was in the previous project.

2009-08-20
217TYPO

Bottom of page: “and place it into the managed object context so it can be persited”; “persited” should be “persisted”

2009-08-19
20TYPO

“We’ve grouped the remaining chapters into roughly
sections ” I’m guessing this was left to be updated later, and maybe this is something the copy editor fixes.

2009-08-20
175TYPO

Footnote carries on to next page.

2009-12-02
182TYPO

Next to last line: s/b “[self updateClockView]” to match example immediately above and provided code.

2009-08-20
379SUGGEST

Apple’s new “System Audio Unit Access Guide” says unequivocally that the Voice Processing I/O unit provides echo cancellation; the description in the book uses an older, weasely non-description of what the unit does. Change last sentence of graf to say “does echo cancellation; use this if you’re writing a voice chat app and not using GameKit”

2009-08-20
159TYPO

In the first paragraph, after the code, the second sentence says to declare the UITextView outlet in FileOverviewViewController.h. I found that it has to be declared in FileContentsViewController.h or it doesn’t work (appendTextToView method in FileContentsViewController.m doesn’t know about the outlet).

2009-08-20
195TYPO

2nd para, line 5: s/b “…variables BOOL show24Hour …” in order to match with following code and download package.

2009-08-20
196TYPO

Code references clockFormatter ivar but text does not list it in the ivars it has the reader specify. Download code includes it in BundlePreferableClockViewController.h

2009-08-20
217TYPO

2nd para, last line: “…with three tracks added.” (no ’)

2009-08-19
217TYPO

Last para, start of 2nd line s/b “…right hand side.”

2009-08-19
217TYPO

Last line of the page…perhaps “As you might expect we ask Core Data to persist the changes once they’ve been made.” or somesuch might read better.

2009-08-19
511TYPO

environemnt should be environment.

2009-08-20
518OK

You alloc but don’t release primeString.

2009-08-20On purpose. This memory leak is diagnosed and fixed in the Instruments section (pp. 524-5)
54ERROR

The first sentence on this page says "So, to summarize: the system starts by calling the main() function, it creates a UIApplicationMain, …

It should read “…it invokes UIApplicationMain,…”

UIApplicationMain is a function, not an object.

2009-08-20
538TYPO

line –9: “…positive feedback its important…”

should be “it’s” not its.

2009-08-19
539TYPO

3rd paragraph, last sentence: “…its really important to keep your testers motivated.”

Should be “it’s” not “its”.

2009-08-19
439TYPO

4th paragraph: “If its not a bug…”

Replace “its” with “it’s”.

2009-08-20
219TYPO

last paragraph: “…since its watching the session object.”

Replace “its” with “it’s”

2009-08-19
355TYPO

middle of page: “…if its set to record…”

Replace “its” with “it’s”

2009-08-20
533TYPO

2nd paragraph from bottom: “While its tempting to use software…”

Replace “its” with “it’s”

2009-08-19
534TYPO

Last bullet item: “…at this point its cheap to add…”

Replace “its” with “it’s”

2009-08-19
23TYPO

First paragraph following “From Bill Dudney”: “But of course its not just the authors…”

Replace “its” with “it’s”

2009-08-20
454TYPO

2nd paragraph from bottom: “…but its basically the same thing…”

Replace “its” with “it’s”

2009-08-20
87TYPO

Last paragraph: “… if its not there…”

Replace “its” with “it’s”

2009-08-19
110TYPO

The class diagram text is completely corrupted in the edition I have. It seems that way on all the line/class diagrams in the book. Screen shots look fine.

Text from diagram at top of page 110:




 



2010-01-20
219TYPO

Last sentence on the page - subject/verb agreement? Depending on the original intent either pluralize to “changes” at start of next-to-last line or use “Any change we make to any object that we get from Core Data is catalogued so that it can be persisted.”

2009-08-19
68TYPO

2nd paragraph: xCode should be Xcode

2009-08-19
83TYPO

First sentence seems to have a typo or 2.

“Now we have a UI and the controller to manage it all that remains it to make the connections.”

Should probably be something more like:

“Now we have a UI and the controller to manage it. All that remains is to make the connections.”

Note the “it” -> “is”.

2009-08-19
228TYPO

Last para, 3rd line, referring to the ’’ button under “…the property list” and then references the “top right hand side”. The that has the option to add relationships is in the lower left of the Property window.

2009-08-19
233TYPO

last para, 2nd line: it’s for its (contraction not possessive)

2009-08-19
234ERROR

Code example at top varies slightly from what Xcode generates (it creates a local id that it then gets numberOfObjects from.)

2009-08-19
71TYPO

line –4: “…we have built our own.” should read “…we have built on our own.” That is, add the word “on”.

2009-08-19
101TYPO

sample code: bottom of page UITableView* should be *nibLoadedCell

spacebar on wrong side of *
its a little thing but confuses us beginners!

2009-08-20It's syntactically correct in a declaration for the * to be on either side (the type or the variable name). We've chosen to consistently put it on the right, so thanks for flagging this one.
28TYPO

Short cut for Build and Go in second last paragraph before 2.3 should Command-Return. It is currently Command-NoIdeaWhatThatIs.

2009-08-19
32SUGGEST

You talk about configuring the Struts and Springs but the IB GUI has this configuration under ‘Autosizing’ heading. It may be better to make it clear that the “struts and springs are configured in the right hand control under the Autosizing heading.” This will stop people looking for the words ‘struts’ and ‘springs’ on the inspector

2009-08-19
71ERROR

Apple Documentation (The Objective-C 2.0 Programming Language PDF) states for init:

“If you set the value of an instance variable, you typically do so using direct assignment rather than using an accessor method.
This avoids the possibility of triggering unwanted side-effects in the accessors.”

and for dealloc:

“Typically in a dealloc method you should release object instance variables directly (rather than invoking a set accessor and passing nil as the parameter), as illustrated in this example”

As such, your use of self.property in both the init and dealloc methods is at best ill-advised.

2009-08-20Not sure what to do with this, when ivars are synthesized this is the only way to approach things.
100SUGGEST

As this is my second iPhone book (actually I have 4 altogether).

It looks ok,

One suggestion:
When changing anything in IB, please specify which xib file you’re talking about.

In table view I had to figure this out, since I am familiar with IB, it will be very hard for somebody who just read first 100 pages to figure this on their own.

Also if you could seperate the user input (where excercise part go) and description of what’s going on with code, etc.

It’s way too easy to miss when you have to do something versus when you’re learning more about the code or IB or something else.

Also the examples should be seperate projects, if chapter needs multiple projects, so be it.
For Example:
Create new project;
Repeat everything from page 10 - 15 and come back here OR copy file from previous project into this project.

Also if you could explain, connection inspector for delegate.
example: you wrote to connect “delegate” to “view” (it was little bit confusing: why, what xib, what object (?) )……

hope this could be added to improve the learning and have more fun….

I will try to add more comments as I go through book.

if you need any additional feedback, email me v_marijan@yahoo.com

2009-08-20
94SUGGEST

You use plain init method of Movie and then set the properties directly. Wouldn’t it be better to use the initWith… method we defined earlier?

2009-08-19
105OK

in - (void)viewWillAppear:(BOOL)animated it looks to me that updatedPath and updatedPaths leak. A comment saying that indexPathForRow:ofSection and arrayWithObjects return autoreleased objects would be nice if this is the case (documentation doesn’t say anything) or fix the code to (auto)release these objects.

2009-08-20These don't leak, because the class-method versions of the init methods (those that take a class name rather than an instance we've just alloc'ed) have an implicit autorelease. The convention of autoreleasing class methods is mentioned in section 3.7, and is used extensively throughout the book.
107OK

“Update UITableView (in background)…”

Some discussion on why this works and why this “in background” would be nice.

Is it because the animate:YES causes an animation thread to be created? If so, will our method finish before the editing events are handled?

Or is each view in its own thread? (I don’t think so)

Please explain.

2009-08-20The code comment is addressed in the subsequent paragraph: " What’s different is that after navigating, it does cleanup work on the table view (while the table is out of sight) by adding the new object to the model array, and then calling insertRowsAtIndexPaths:withRowAnimation: to update the table to reflect the new state of the model. " \n \nBy background, we don't mean on a thread, but instead that the update is done on a view that is not currently visible.
240TYPO

2nd para, line 3: its for it’s.

2009-08-19
238SUGGEST

Bottom of page suggests that a firstInsert property (implied to be boolean) should be implemented, even though the text has nothing to that point or in the chapter about boolean properties (which are done a bit differently.)

I feel that Chapters 10 and 11 are very poorly constructed (though the writing appears to be strong.) While there is a desire (and it is well-founded) to “push them into the pool” at a certain point, some new concepts/tasks in these chapters are glossed over if even referenced at all, even though the point of the book is to at minimum make readers aware that they need to deal with such things.

These chapters could very well discourage a large number of readers. My understanding is that this is not meant to be a “just look at the source examples” kind of book, but in these chapters I’ve noticed it taking a turn that way - even if it’s unintentional, it’s the end result.

Overall I think the book is strong but perhaps these chapters could get another look?

2009-08-20
241TYPO

bottom, line before bullets: s/b “overview” (one word)

2009-08-19
242SUGGEST

Last para of 11.7 is a bit unwieldy/redundant. Perhaps something like: “The final aspect of dealing with table views is learning how Core Data can help us navigate the details of our objects.”

2009-08-19
372ERROR

cafPath should look for files of type “caf”, not “aif”.

2009-08-20
121TYPO

Opening the nib file of the contained view requires double clicking on the blue link. Not merely clicking as the text says: “Open it by clicking on the blue link in the window.” Should be “DOUBLE clicking”

2009-08-19if you wait for the cursor to turn into a hand then a single click suffices
124TYPO

First paragraph on this page (“The conditional setting of the view controller’s key property is required … it is much better to use the deleteRowsAtIndexPaths:withRowAnimation: or
insertRowsAtIndexPaths:withRowAnimation: method instead.”) isn’t referring to the code just prior to itself but rather two the code before that. Also, it seems to be out of date as we don’t load the table view’s data anywhere in any of the code in this section (so far as I can tell).

2009-08-19
126TYPO

“Choose to make a subclass of UITableViewController click Next and then
name your new controller DVDCabinetController.” It is not possible to make a subclass of UITableViewController (XCode 3.1.3). UIViewController is available, though. If you mean we need to change the file to change the inheritance, make this clear.

2009-08-19
136TYPO

“resort” does not mean “to sort again”. Use “re-sort”.

2009-08-19
136TYPO

It took me a while to understand that the ‘states’ method is a getter for the states property. This should be explained to stop people accidentally creating an ivar and synthesizing when it’s not required.

2009-08-19
135TYPO

If we follow your instructions, createData is never called. Should specify that it should be called.

2009-08-19createData is called from applicationDidiFinishLaunching: on the previous page
151SUGGEST

Regarding writing our own property. Do we still need to use the (nonatomic, retain) attributes on the property declaration? Are these used as hints by any thing other than a human reader?

2009-08-20
152SUGGEST

“Since this retains the new directory contents, be sure to add a [director yContents release]; to your dealloc method. ”

Shouldn’t we also release directoryPath in dealloc? If not, why not?

2009-08-20
152TYPO

" along with some “helper” directories that we’ll examine in a minute. " We’ve already examined them earlier.

2009-08-20
154ERROR

“-(void) setFilePath: (NSString*) p {
if (filePath != NULL)
[filePath release];
[p retain];
filePath = p;
…” Testing filePath for null is not required. You should retain p before releasing filePath as they may be pointing to the same object. You got this right in the directory view controller, not sure why this code, which should be essentially the same, is so different.

2009-08-20
156ERROR

“4. Add this custom view controller to your navigation controller with
pushViewController:animated:, as seen above, in Director yViewController’s
tableView:didSelectRowAtIndexPath:.” This step isn’t required, the navigation was set up earlier. I can run the app now and it works from a navigation point of view (the labels aren’t updated, but we aren’t up to that yet in the sample).

2009-08-20
157TYPO

“the ones we want are NSFileSize, NSFileCreationDate, and NSFileModi-
ficationDate”. We don’t use the creation date in the example.

2009-08-20
162SUGGEST

Don’t use “info.plist” as an example. It contains control characters that make the display and NSLog print outs look weird. I thought there was something wrong with the code but I dragged-and-dropped a normal text file to the Resources group of the project and selected ‘Copy’ and then it appeared in the bundle and I could view that properly. (So, this could be a good way to introduce how to add arbitrary resource files to the bundle).

2009-08-20Info.plist was a text file back in iPhone 2.x. We're changing the description to indicate that it's a binary settings file, and between this and the footnote explaining that most (all?) of the default contents are binaries, we hope that readers will hang tight until later in the chapter when they can create text files that are then readable by the FileContentsViewController.
105TYPO

In the last paragraph, there’s a sentence containing “we’ll user..” but should be “we’ll use”.

2009-08-20
225TYPO

First paragraph under 11.4 has a sentence containing “lets start fleshing out our application but building” but should be “by building”

2009-08-19
222TYPO

Last paragraph, first sentence contains “and the one will be interacting with the most” should be “the one we’ll be interacting with the most”.

2009-08-19
226SUGGEST

I’m stuck on the bullet “Generate Track and Session classes and add them to the project.” Having never used this modeling tool before, it would be nice if you showed us how to generate the classes for our entities.

2009-08-19
87TYPO

@synthsize in first paragraph.

2009-08-19
243SUGGEST

I’m not sure I see the benefit in having the TextAreas in the editing controllers blend into the background. This seems inconsistent with the book so far - in the test app and the screenshots the reader is supposed to work off of, they appear just like labels have appeared in examples throughout the book and not like the earlier TextArea example. The only way to know that they are TextAreas is the casual mention on this page and the earlier reference that they’re editable. I’m fine with the challenging the reader but since in this example you’re asking them to work largely off the screenshots (I gather the hope is they try without looking at your code first) it seems misleading at best.

2009-08-19
243SUGGEST

To clarify previous suggestion, it’s fine to change to the transparent form as long as you alert the reader - it’s a really good way to introduce a new approach. Not saying anything or giving any kind of visual cue comes off a bit as “You can assume everything’s the same as before, except the things we changed and didn’t tell you about.”

2009-08-19
154OK

Calling [self updateFileOverview] is problematic as the Outlets may not be wired up yet. See discussion here: www.cocoabuilder.com/archive/message/cocoa/2009/8/8/242390

2009-08-20In this case it's OK because we set the property (and thereby call updateFileOverview) after pushing the new VC onto the navigation controller's stack; this will force the view to load and wire up outlets if it hasn't done so already. Another way around this problem is to just touch the view property; we actually do this in the AV Foundation chapter (section 16.2, p. 345 in b15). \n \nIt could be problematic, but I don't want to get into an aside about nib-loading and outlet-wiring in a chapter that's proven plenty difficult for readers already.
87ERROR

Both the original method edit as provided in the second code block and the extenden method edit ( with the workaround statet in the footnote ) don’t work. The iPhone simulator doesn’t show the MovieEditorViewController. Funny, but on the device it works, only the simulator doesn’t show the view. Maybe there is some workaround? Another one…

2009-08-19Seems strange indeed, please post this to the book's forum and we will work it out.
81TYPO

Footnote 5 last sentence shoud read: We keep
it all in one class here for simplicity’s sake.

2009-08-19
189TYPO

“a folder that contains two items by default: a Root.plist file, and an English.lproj localization folder”. For me at least (XCode 3.1.3; iPhone 3.0), the localization file is “en.lproj”.

2009-08-20
189TYPO

“The starter entries provide a title (already set to your project name)”. This is not true for me (XCode 3.1.3; iPhone 3.0). I have the other two entries, but not “Title”.

2009-08-20
89SUGGEST

A lot of people will probably eventually have some table view cell with a variable row height. Typically, a cell with a label which can have multiple lines of text. Sometimes, you might have to change the height of that cell in plain sight of the user. In this case, it might be nice to know how you can animate this height change, as it’s entirely non-obvious.

Simply calling

[tableView beginUpdates];
[tableView endUpdates];

with no updates in between will call tableView:heightForRowAtIndexPath:, and it will animate changes in row heights.

2009-08-19
76TYPO

The incorrect indefinite article is used in the following sentence:

“That is an simple enough looking line of code isn’t it?”

This is the second sentence in the second paragraph, right after the code snippet.l

2009-08-19
272OK

I didn’t find a hint on the declaration of “interestingTags”. Maybe when defining this instance variable, there could be a hint to also put it into the header file as a variable.

2009-08-20That's what this sentence says: " To watch for these, let’s add NSSet* interestingTags; to the header file."
226TYPO

I always struggle with reading the sentence: “Change the template provided ’Event’ entity to the ’Track’ entity.” I think there is something missing in there, but being no native speaker, I don’t really know what exactly.

2009-08-19
226TYPO

In the last paragraph I think there’s an “and” missing in “Select the entity then in
the Entity attributes inspector change the name from ’Event’ to ’Track’.”. Maybe “…attributes inspector AND change the…”

2009-08-19
237TYPO

In the first paragraph there’s a sentence that need some polish: “…I’ve placed the table view in the Grouped style or to implemented the tableView:titleForHeaderInSection: method…”. I think “or to implemented” is not correct.

2009-08-19
238TYPO

In the second paragraph there is a sentence that seems to be missing a “with”: “The FRC helps us keep the table view in sync the changes
through delegation.”. Shouldn’t it be “…in sync WITH the changes…”?

2009-08-19
242TYPO

I think there is missing an ‘is’ in the second paragraph: “The last remaining piece of dealing with table views that we have not
looked at yet how Core Data can help us with navigating into the detail
of our objects.” Shouldn’t it be “…looked at yet IS how Core…”?

2009-08-19
244SUGGEST

I wonder why all of a sudden you choose to use underscores for the instance variables. Maybe you could explain this in a short sentence or just note that you’re doing that. Otherwise the readers might think they missed something.

2009-08-19
457TYPO

In the Location Manager’s Delegate box, “applications” should be “application’s” in the sentence, “…whatever model you have to keep track of the applications location data.”

2009-08-19
115TYPO

Context: example code for sortMoviesArray

The closing brace of the switch statement has a semi colon following.

Seems to compile fine, but i have never seen that done before, and most other code examples in book with switch() do not do this - there is one other on page 279.

-(void) sortMoviesArray {
switch (sortControl.selectedSegmentIndex) {
case 0: // sort alpha ascending
case 1: // sort alpha descending
case 2:
default: // sort $$ ascending
} ; << = trailing semi colon
}

2009-08-20
113DEFER

…set the titles of the segments to A-Z, Z-A, and $ (or whatever monetary symbol makes the most sense for your locale)…

Might be nice to have an example of how to actually set the monetary symbol in a locale sensitive way - ie so it would change automagically - dependant on locale

203ERROR

Each of the IBOutlets should probably be properties. This doesn’t seem to be the case in the quoted code because you seem to be showing the whole interface. Also addShoppingListItem: should probably be marked-up to return IBAction rather than void.

2009-08-20
232SUGGEST

Regarding the Discussion of Track.h and Categories. Given that we’re defining Track, why don’t we just put the methods directly in the class declaration rather than in a Category? I thought Categories were more for adding methods to other Classes or Classes to which we don’t have source code access. Why declare a Category for class X in the same header file that declares X itself?

2009-12-04
239TYPO

“While we could have used the property set methods it is very common to see Core Data code use the KVC approach.” This implies that it is a personal choice with no technical ramifications. If that is the case, make it clearer that there is no fundamental difference. If that is not the case. Say so.

2009-12-04
246ERROR

“In addition to removing the session from the managed object context we also remove it from the track’s session list.” refering to code on previous page. I don’t think we need to delete the session from the track manually. Isn’t that what the Nullify Delete Rule property of the relationship will do for us?

2009-12-04
127ERROR

The book seems to assume you’re working from the downloaded files, but if you’re typing by hand (which I find is a much better way of getting a feel for developing in a language. It helps me get the rhythm of the code into my head somehow) then the instruction in paragraph 3 to make a connection from the File’s Owner’s view outlet to the newly placed Table View simply doesn’t work because IB doesn’t know that the File’s Owner has a view outlet.

2009-12-04
124SUGGEST

In the last sentence on the page, the definite article preceding “view controller” is omitted. It should be “The title of the view controller just behind the topViewController in the stack is placed into the back button.”

2009-12-04
29SUGGEST

Horrible, horrible page break in the middle of a two line paragraph at the bottom of the page.

2009-12-02
182TYPO

In general and in this book (see the example code directly above implementing ‘setClockToTimeZoneName:uses24hour:’), pointers should be compared to ‘nil’ rather than ‘NULL’. Thus, the first line of ‘updateClockView’ should read:
if (clockFormatter == nil) {

2009-12-02
182ERROR

In general and in this book (see the example code directly above implementing ‘setClockToTimeZoneName:uses24hour:’), pointers should be compared to ‘nil’ rather than ‘NULL’. Thus, the first line of ‘updateClockView’ should read:
if (clockFormatter == nil) {

2009-12-02
59ERROR

My ‘C’ background may be confusing me (I’m new to Objective C) but:

On page 59 of the book, as far as I can understand, helloLabel and nameField are just pointers to the IB objects, and would not need to be ‘released’ quite yet as we have not yet ‘retained’ them (I cant see in the code where they were retained). The 2nd paragraph mentions that we have retained them, but that is not obvious in the code.

It’s not until page 60 where after we create properties to access them as variables (using @property nonatomic retain) that we would need to ‘release’ them.

Have I got that right, or do they need to be released even if they are just pointers.

In any case, that may be worth clarifying, I was confused by that.

2009-12-02
nanaERROR

The MovieTable03 project compiles and runs but once a row is selected I get a “_Terminating_Due_To_Uncaught_Exception” error and the app locks up.

Running: Xcode 3.1.3, OSX 10.5.8, SDK 3.0

2009-12-02In the downloadable example code, MovieTable03's RootViewController.xib has a MovieEditorViewController object whose "NIB file" value is "MovieEditorView". This breaks because there's no "MovieEditorView.xib" file. The correct value is "MovieEditorViewController". Note that this field's value is correct in the Movie01 and Movie02 projects... it's only Movie03 where this is broken.
480ERROR

The instructions to add TouchXML to your project do not include a step to add “-lxml2” to the Other Linker Flags setting in the build tab in the target’s Get Info dialog box. Link errors happen without this flag. ~Jeremy

2009-12-14
18TYPO

In the last paragraph there needs to be a space between ‘thus’ and ‘far’. “The iPhone and iPod touch are highly predictable, with only a few models thusfar…”

2009-12-02
216TYPO

3rd line of the 2nd paragraph -

“switching your thinking back and fourth” should be
“back and forth”

2009-12-04
217SUGGEST

Grammar suggestion —

Your punctuation could be much better. One glaring issue is that you have numerous “introdcutroy adverbial phrases” that really should have a comma at the end of the phrase.

Good punctuation facilitates better understanding and makes passages much easier to comprehend.

Example from pg 217, last sentence on the page (spills over to 218)…

CURRENT:
After the changes are made as you’d expect we persist them….

SUGGESTED:
After the changes are made, as you’d expect, we persist them….

2009-12-04
219TYPO

Wrong tense of verb used.

Last sentence….
“Any change we make to any object that we get from Core Data — ARE — catalogued so they can be persisted.”

Should be….
Any change we make to any object that we get from Core Data — IS — catalogued so they can be persisted.

As in … “Any change IS catalogued”

2009-12-04
219TYPO

Punctuation and Proper use of “ITS vs IT’S”
Text below the last image on the page….

1) Introductory Adverbial Phrase
2) spurious comma before the and…I think should be after
2) “its” should be “it’s” since it is not possesive, it is a contraction for “it is”

CURRENT:
“When the user is finished making changes to the session information the text is placed back on the session object, and as you’d expect Core Data makes note of the changes since its watching the session object.”

SUGGESTED:
“When the user is finished making changes to the session, information the text is placed back on the session object and, as you’d expect, Core Data makes note of the changes since it’s watching the session object.”

2009-12-04
220TYPO

COMMA USE (or lack thereof):

Current:

“However when you start to dig into what you’ve
made by instantiating this template with ’Use Core Data for storage’ enabled you start to see some subtle differences.”

Suggested:
“However when you start to dig into what you’ve
made by instantiating this template with ’Use Core Data for storage’ enabled, you start to see some subtle differences.”

2009-12-04
224ERROR

The applicationDocumentsDirectory property is used to find the application’s Documents directory. It is calculated every time the get method is called. For more info see Section 10.3, Copying to the Documents directory,
on page 205.

…strictly speaking, it is not calculated EVERY time the persistentStoreCoordinator method is called. Only the first time, right? After that, the persistentStoreCoordinator is no longer ‘nil’ and the method returns (before the applicationDocumentDirectory logic can get called!)

2009-12-04
225TYPO

First line of the first paragraph

CURRENT:
Now that we have seen the way the template has set up Core Data for us, lets start fleshing out our application but building our managed object model.

SUGGESTED:
Change the ‘but building our…’ to ‘by building our…’

2009-12-04
227TYPO

Current:
For example if we were to provide a Regular Expression
(also know as a regex…

1) Add comma after “For example,”
2) Change “(also know as” to “(also known as”

2009-12-04
34TYPO

I believe there are missing links to a couple of iPhone dev websites:

“…with iPhone Developer Program [?] where you can apply for the pro- gram. Once accepted you can go to Obtaining your iPhone Development Certificate [?]”

2009-12-02
92OK

In the middle paragraph of this page, it says that UINavigationController is the parent of RootViewController. If you look at RootViewController.h, you will see that the parent is UITableViewController.

2009-12-07The parent/child relationship we're talking about is the arrangement of objects in the nib file, not superclass/subclass relationships. The UINavigationController manages a set of child objects, which in this case includes the root view controller.
56OK

The code at the bottom of page 56 makes the keyboard dissapear when return is tapped, but doesn’t actually perform the expected action. Surely [self sayHello:nameField]; would be better.

2009-12-07The fact that this only dismisses the keyboard and doesn't perform an action is explained on the next page: "It doesn’t update the hello label, because the code to do that is in sayHello:, which is only called by the “Say Hello” button tap. In this common case where you want the same code called by both a button tap and the return key, you’d usually put the common functionality into a helper method that both event handlers call."
102TYPO

The 2nd paragraph in the section titled “Adding the MovieEditorViewController begins with a sentence that reads ”As with the Movie class, you’ll need to copy the MovieEditorViewController.h and MovieEditorViewController.m classes…"

Change the word “classes” to “files”. There is just one class involved in this move.

2009-12-02
82TYPO

In first paragraph of section 4.7, it reads:
“click on iPhone OS->User Interfaces”

This should read “User Interface” to match the selection.

(Xcode v3.1.3)

2009-12-04
88TYPO

Second paragraph under diagram read “Build & Run”; should read “Build & Go”.

2009-12-04
106TYPO

The last sentence in the 2nd paragraph reads “Select the Bar Button, bring up the Identity Inspector…” It should say “Attributes Inspector”. The keyboard equivalent is correct.

2009-12-02
99TYPO

It may be me but please check the last paragraph on p.99. Should ‘former’ and ‘latter’ references be reversed. Great book so far.

2009-12-02
84TYPO

“All text related controls in Cocoa Touch will bring up a keyboard when ever they become first responder.” should be “…keyboard whenever they become first responder.”

2009-12-04
102TYPO

“As with the Movie class, you’ll need to copy the MovieEditorViewController.h and MovieEditorViewcontroller.m”

should be

“…MovieEditorViewController.m”

2009-12-02
122ERROR

cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero
reuseIdentifier:CellIdentifier]

On page 98, you state:

However, in iPhone SDK 3.0, this initializer is deprecated in favor of initWithStyle:reuseIdentifier:, which takes one of the style constants instead of the CGRect.

2009-12-04
179TYPO

“This method loads the FlipsideViewController (see below) from a nib, sets the flipside view controller’s delegate to the main view controller, sets the a new- in-3.0 modalTransitionStyle property to set up the “flip” animation, and shows the flipside view controller modally."

should be

“…sets the new-in-3.0 modalTransitionStyle property…”

2009-12-02
219TYPO

“Pressing the ’+’ button, as you’d expect’ creates a new Session.”

should be

“Pressing the ’+’ button, as you’d expect creates a new Session.”

(superfluous apostrophe)

2009-12-04
225TYPO

“Now that we have seen the way the template has set up Core Data for us, lets start fleshing out our application but building our managed object model.”

should be

“…lets start fleshing out our application by building our…”

2009-12-04
76TYPO

There is a semicolon right before a list that I believe should be a colon. “That process runs more or less like this;”

2009-12-04
478TYPO

“extract the information we need that doing the same with the parser.”

“that” should be “than”

2009-12-04
478SUGGEST

This page mentions “tidy” but there doesn’t seem to be any introduction to what “tidy” actually is. The capitalization for tidy changes, making it more confusing.

2009-12-04
471TYPO

paned around should be panned around

2009-12-04
99ERROR

Uncomment the default implementation and change it to return YES;. When you do this, you’ll find that you can swipe horizontally on table rows to bring up a delete button.

It appears that uncommenting that method does not enable swiping: you also have to uncomment tableView:commitEditingStyle:forRowAtIndexPath:.

2009-12-02You're right. Implementing tableView:canEditRowAtIndexPath: to return YES does nothing useful by itself (at least as of iPhone SDK 3.0), and requires you to also implement tableView:commitEditingStyle:forRowAtIndexPath: to actually perform the delete on the table model.
94TYPO

The indentation for the (void)viewDidLoad code sample is off. Everything under [super viewDidLoad] is indented, but it should be inline with the [super ..] call.

2009-12-04
96TYPO

The first paragraph on the page (under 5.4 Table Cells) starts with ‘Thusfar’. There should be a space between ‘thus’ and ‘far’.

2009-12-02
385TYPO

“your” should “you’re” or “you are” in the last sentence on page 385 (b15_0):

“Add the instance variables and the @synthesize statements to the implementation file and your done
with the Dot class.”

should be…

“Add the instance variables and the @synthesize statements to the implementation file and you’re done
with the Dot class.”"

2009-12-04
277ERROR

in composeMailTapped

an instance of MFMailComposeViewController is created using:

MFMailComposeViewController *mailController =
[[[MFMailComposeViewController alloc] init] autorelease];

in the delegate this same instance is released.

It seem’s to release an object allready released so the app crash

2009-12-02
67OK

The Target Action Paradigm block is followed by a dangling } character from the previous code block. Looks kind of strange.

2010-01-20
417ERROR

Running BasketballTeams crashes with this on console:

[Session started at 2009-09-22 23:23:34 –0400.]
2009-09-22 23:23:36.710 BasketballTeams[547:20b] * -[NSCFArray createViewForNavigationItem:]: unrecognized selector sent to instance 0xd13f70
2009-09-22 23:23:36.715 BasketballTeams[547:20b] * Terminating app due to uncaught exception ’NSInvalidArgumentException’, reason: ’* -[NSCFArray createViewForNavigationItem:]: unrecognized selector sent to instance 0xd13f70’
2009-09-22 23:23:36.723 BasketballTeams[547:20b] Stack: (

2009-12-04
182OK

My version of Xcode produces a MainWindow.xib with the first view in it and a SecondView.xib in contrast to what’s described in the text below.

By default, the MainWindow.xib has two view controllers to handle the
two tabs, which is what we want, though they’re named “First” and
“Second” by default. Find the “Selected First View Controller” in Inter -
face Builder (you’ll have to change IB’s view mode to list or column
to see it), expand it to get to its “Tab Bar Item”, bring up the Iden-
tity Inspector, and change its Title to “Add Item”. Similarly, change the
second view controller’s tab bar item’s Title to “List by Price”

2009-12-07It sounds like you have used the Tab Application template, rather than the Utility Application template.
57ERROR

“We declare retaining properties for objects that never get released.” Your example didn’t declare retaining properties. The helloLabel and nameField are simply members.

2009-12-02Right. That bit was out of its proper order. The reason we're leaking at this point (before introducing properties) is that objects loaded from nibs get a stealth retain if they're assigned directly to an instance variable. That's another reason properties are recommended: typing "(retain)" in that property declaration can serve as a reminder to release the object later. At any rate, we'll clarify this in the next printing. Thanks.
122ERROR

In the last paragraph, it says:

“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.”

If I follow these instructions, my DVDCabinetController class does not show up in IB to assign to the view controller I create. Rather than creating an Objective-C class, shouldn’t I create a UIViewController subclass? If I do this, then my DVDCabinetController class appears for assignment in IB.

Maybe I am wrong though. Enjoying the book greatly otherwise.

2009-12-04
123SUGGEST

(First off, I am not sure if the errata page numbers are lining up correctly, because the other errata reported for this page seem to reflect things that happen a few pages earlier in P1.0)

The discussion of how to create and configure the RootViewController XIB file (the detailed walk-through of the five-point list on page 122), including configuring it for navigation with a table view, and hooking up the outlets and delegates (pretty much the whole page), can now all be taken care of automagically by Xcode 3.2. If you choose File->New, and pick the “UIViewController Subclass” in the Cocoa Touch Class section, there is a checkbox for “UITableViewController subclass” and another for “With XIB for user interface”. If you check both of those, things are set up exactly as the text walks us through doing manually.

2009-12-04
509481OK

The code on the page has a typo. The value “fabsf(2.0.z) < 2.0” should read:
“fabsf(acceleration.z) > 2.0”

context:

if (fabsf(acceleration.x) > 2.0
|| fabsf(acceleration.y) > 2.0
|| fabsf(2.0.z) > 2.0) {
shakeCount;
if (shakeCount > 4) {

2009-12-07I'm sorry, I can't find this code in the book or the downloadable examples. In fact, the string "shakeCount" doesn't appear anywhere on my local drive.
477ERROR

To build TouchXML / Tidy correctly, I needed to add “-lxml2” to the linker flags in the project.

2009-12-04
344ERROR

Code to set level meter label to "L" or “M” attempts to reset the whole UILabel object, not just its text property. Change:
\t\tleftLevelLabel = "L"; to \t\tleftLevelLabel.text = “L”;

and make a similar change four lines later for the @“M” (mono) case.

2009-12-02
199TYPO

In the last sentence of the page where it says to “change the nib file from the no longer existent MainWindow.xib to ListByPriceView.xib”. It should say SecondView.xib rather than MainWindow.xib.

2009-12-02
177OK

The variable timeZoneName is introduced here for the first time, without a mention of what it is or does.

2009-12-04
177OK

My mistake on the erratum I reported, just noticed it mentioned above the code.

2009-12-04
300TYPO

The word “the” is repeated in the first sentence at the top of the page.

2009-12-02
65SUGGEST

The bottom paragraph instructs the reader to make the MovieEditorViewController act as the delegate for UITextFields…and helpfully instructs to include after the @interface declaration. It does not remind the user to connect the textfields to this delegate in Interface Builder (for anyone with this problem, select each text field and hit cmd+2, then connect the delegate to ‘File’s Owner’). This had me scratching my head for a minute after first running the app.

2009-12-04
223TYPO

With these two entities and the relationship between the modeled,
Should be
With these two entities and the relationship between THEM modeled,

2009-12-04
36ERROR

With code as written, start app, then press ‘Say Hello’ twice without typing anything. Second time, the label says ‘Hello (null)’. Changing line 7 on this page to
nameField.text = @“”
appears to fix the problem, but having only just started with ObjC, I don’t know if that is safe, or if it is passing a pointer to a temporary local.
Please advise…

2009-12-02
nanaTYPO

Source code error: Address Book > Contacts project, RootViewController.m

The variable “data” (of type CFDictionaryRef) is not released in the “makeNewEntry” method.

Compare to Apple’s code in “Working with Address Book Objects” section of the “Address Book Programming Guide for iPhone OS”:

CFDictionaryRef aDict = CFDictionaryCreate(…);

CFRelease(aDict);

2009-12-04
47SUGGEST

When you release the mouse, a small HUD
window will pop up and show the declared actions that you can connect
to. Since you declared only one IBAction, it’s your only choice here:
sayHello:.(If saYHello HUD pop up is NOT clicked the connection will not be made, making the button inoperable)
This completes

2009-12-02
59SUGGEST

The term ‘ivar’ is never explicitly defined in the text. It’s just inferred that ivar is probably “instance variable.” P 59 of the eBook is the first occurrence of the abbreviation, and should be noted as “…instance variable, or ivar.” It’s a small point but should be addressed as it would in any other technical writing.

2009-12-02
48OK

In footnote 5 shouldn’t the verb form be plural?

2009-12-02No. Singular gerund "formatting" takes singular verb "is".
52TYPO

In the first sentence: “…the main() function, which calls UIApplicationMain(),…”

2009-12-02
53ERROR

In the first sentence of the second paragraph, UIApplicationMain doesn’t really declare the object that is the application delegate, does it? The first sentence of the previous page states that the application delegate is found in the nib.

2009-12-02
53TYPO

In the last sentence of the second paragraph shouldn’t it read “…then implement all delegate methods not marked as ‘optional’”?

2009-12-02
29SUGGEST

The last sentence refers to a text field when it seems it must actually mean the text in the label. Perhaps the sentence should be reworded along this line: “You also need to specify center alignment for the text in the label.”

2009-12-04
68SUGGEST

In the implementation of Movie class, custom factory method initWithTitle… should return a object that has been autoreleased.

2009-12-04
56TYPO

On the last line of the page “release method” should be “release message”

2009-12-02
79ERROR

In the screenshot of the Identity Inspector for the MovieEditorViewController there are both Class Actions and Class Outlets listed, whereas in the most recent version of XCode those two panels are missing (i.e., only the Class Identity and Interface Builder Identity panels are shown). Apparently one needs to navigate to the the Connections Inspector to view the actions/outlets now.

2009-12-04
84TYPO

At the end of the last sentence of the first paragraph, shouldn’t “…for each property” be something like “…for the new property”?

2009-12-04
232TYPO

I may be missing something, but I can’t find where the sections is set to nil in any of the example code projects OR boilerplate code from XCode:

“(We did not show that code, but it’s in the applicationDidFinishLaunching: method on the ConferenceAppDelegate from the downloaded code.) We use nil for the section key because we don’t want any sections.”

2009-12-04
73TYPO

In the first sentence on the page, it should start as “Now we’re ready to update…”, i.e “to” is missing from the original.

2009-12-04
193TYPO

Final line of page reads:

database and db, respectively.

Should be:

shopping and db, respectively.

2009-12-02
85TYPO

Text for for all four arrows in the graphic is garbled

2009-12-04
394ERROR

In the –drawRect: method, you have a memory leak every time it’s invoked. You need to add a CGPathRelease(path) before you exit the method.

2009-12-04
267ERROR

[controller release] statement should be removed from the end of the -(void)mailComposeController:….. controller is a variable local to the delegate function and is not retained. The mailController (created in code) is auto released. As written, the app will crash since a freed object is being sent a message.

2009-12-10Well, there are two ways of doing this. It's buggy in the first printing because the controller is autoreleased when we create it in composeMailTapped, and then releasing it again in the callback is a crasher. So there are two approaches: either autorelease it, or don't autorelease it and instead release it on the mailComposeController:didFinishWithResult:error callback. Problem is that we did both. Cleaner to just cut the release in the callback. See also erratum 40795.
228TYPO

In the third sentence of the first paragraph shouldn’t the last word be “class” rather than “object?”

2009-12-11
241OK

Shouldn’t the first sentence of the first paragraph be two sentences (the first ending after “RootViewController” and the second beginning with “With”)?

2009-12-11
133TYPO

Last sentence of third paragraph needs a direct object at the end: “…and you can manipulate them.”

2009-12-11
196TYPO

None of the SQL in the SQLite chapter shows up on the Kindle DX in .mobi format

276ERROR

Remove line in sample code ‘[controller release]’.

The controller is defined as autoreleased. Releasing an autoreleased controller will cause a crash.

Of course, I could be wrong. Please let me know if I’m mistaken!

2009-12-14
191SUGGEST

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.

2010-10-21
191ERROR

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.)

2010-10-21
86ERROR

There is a bug in the source code for chapter 5
Bug: Memory Leak
File: /TableViews/MovieTabler02/Classes/RootViewController.m
Line: 56
Desc:

moviesArray = [[NSMutableArray alloc] init];

This is allocated but never released…

2010-10-20
156147TYPO

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

2010-10-21
86ERROR

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.

2010-10-20
47TYPO

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.

2010-10-16
69SUGGEST

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.

2010-10-16
70SUGGEST

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.

2010-10-16
236ERROR

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.

2010-10-16
377SUGGEST

The example application “Draw” seems to be missing the code to actually draw the dots.

2010-10-16
119OK

UITableViewCell method initWithFrame:reuseIdentifier: is deprecated in iPhone OS 3.0

2010-10-20The current version of the book covers iPhone OS 3.0, but we chose to make sure that our code would compile and run on 2.0 as well, so we used 2.0 conventions where necessary, such as -[UITableViewCell initWithFrame:reuseIdentifier:] rather than 3.0's -[UITableViewCell initWithStyle:reuseIdentifier].
460TYPO

“its” should be “it’s”:

“if we have a valid location, and its within 20 meters then stop”

2010-10-21
75TYPO

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.

2010-10-16
134ERROR

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.

2010-10-16
89TYPO

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;”

2010-10-20
227ERROR

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];

462ERROR

CLLocation’s getDIstanceFrom: is deprecated in favor of CLLocation’s distanceFromLocation: in iPhone OS 3.2

2010-10-16
306OK

MPMoviePlayerController’s MPMoviePlayerContentPreloadDidFinishNotification is deprecated in favor of the loadState property.

2010-10-21The deprecation is in iPhone OS 3.2, and the book is written to cover 3.0. We can use the new property in future versions of the book covering iOS 4 or later.
229DEFER

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 :(

79ERROR

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..

2010-10-16
122ERROR

In the last paragraph it says:

“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.”


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!!!!

2010-10-16
130SUGGEST

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];

\treturn 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…

2010-10-16
131SUGGEST

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];
>>

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…

2010-10-16
108OK

The example code has an ‘initWIthFrame:CGRectZero’, which according to page 84, has been depricated for iPhone SDK 3.0. It should read ‘initWithStyle:UITableViewCellStyleDefault’.

2010-10-20The current version of the book covers iPhone OS 3.0, but we chose to make sure that our code would compile and run on 2.0 as well, so we used 2.0 conventions where necessary, such as -[UITableViewCell initWithFrame:reuseIdentifier:] rather than 3.0's -[UITableViewCell initWithStyle:reuseIdentifier].
83SUGGEST

I find the heading “4.8 Making the MovieEditorViewController” confusing since a previous section described the creation of that class and .xib file. Perhaps “Making the MovieEditorViewController instance”, or “Launching the MovieEditorViewController”, or “Connecting the two controllers”, or…

2010-10-16
107TYPO

In the section “Loading and Using a Custom Table Cell”, 3rd line: the phrase “…we try to fail to dequeue…” is confusing. Did you mean just “we fail to dequeue”

2010-10-20
83ERROR

“This last step is optional.” it is never said what is the last step, I figure that it is selecting the checkbox on clear when editing begins

2010-10-16
84TYPO

you forgot to mention to
#import “MovieEditorViewController.h”

otherwise xcode fails with strange errors around
self.editingViewController

2010-10-16
67ERROR

Line [formatter setNumberStyle:NSNumberFormatterCurrenctyStyle];
results in an empty string return from numberFromString (self.movie.boxOfficeGross hold empty string).

2010-10-16
132ERROR

I use the latest 3.1.3 iPhone SDK on the latest Snow Leopard version. There, the creation of a “UITableViewController” subclass has changed: The book says to select “Objective-C class” and then select “UITableViewController” in the subclass pulldown. In my Xcode version, “UITableViewController” isn’t in that dropdown anymore. Instead, you need to select “UIViewController subclass” and then check the “UITableViewController subclass” checkbox. There you can even create the XIB file in the same step.

2010-10-16
228ERROR

I use the latest 3.1.3 iPhone SDK on the latest Snow Leopard version. For me, the generated “Track.h” doesn’t have the lines that start with “@interface Track (CoreDataGeneratedAccessors)”.

2010-10-16
34TYPO

In the second sentence, “…review the directions in…”

2010-10-16
50TYPO

Last sentence of the penultimate paragraph: “…load the application from a nib file.” Don’t you mean obtain obtain the values for the third and fourth parameters (application’s main class and its application delegate) from a nib file?

2010-10-16
55TYPO

First paragraph, first sentence: Shouldn’t “…copy and pasting…” actually be “…copying and pasting…?”

2010-10-16
73SUGGEST

The sentence states, “The interest-ing thing here is why choose viewDidLoad.” This sentence reads wierdly and jarred me out of iPhone-land. Perhaps it would be better written as, “The interest-ing thing here is why we chose viewDidLoad.”

2010-10-16
171TYPO

2nd paragraph:

“… and implement them in FlipSideViewController.h” should read “FlipSideViewController.m”

2010-10-21
118ERROR

Both picture and the text on p. 118 show that Table View for RootViewController has a navigation bar, however that’s not what I see in XCode 3.2.1 (iPhone OS 3.1.3) - it’s just a table, with no Navigation bar.

2010-10-21As with the last chapter (see p. 100 in p2.0), the simulated navigation bar is added by using the "simulated interface elements" in the attribute inspector (cmd-1) for the table. We'll make this explicit in the next edition.
125TYPO

numberOfSectionsInTableView: should also be implemented - it’s shown in the source on the website but isn’t mentioned in the book

2010-10-16
82OK

UITableViewCellStyleValue1 and 2 descriptions say they are intended only for use in group-style tables. Why is that? They seem to work ok in plain tables. And… on the next page, they are shown in Figure 5.4 in a plain table! If they aren’t appropriate for plain tables, they shouldn’t be shown as an example.

2010-10-20From Apple's iOS Human Interface Guidelines: \n \n"Although you can use the value 1 table-cell style in either a plain or a grouped table, its appearance is better suited to a grouped table. For example, the Usage screen in Settings uses the value 1 style in grouped tables:" \n \n"Although you can use the value 2 table-cell style in either a plain or a grouped table, it looks much better in a grouped table. For example, the Info screen in Contacts uses the value 2 table-cell style in grouped tables:" \n \nThey work, but they're inappropriate - we're just passing along Apple's guidance here.
145ERROR

The book names the wrong class to use as the File’s Owner for the “FileContentsView.xib” nib file in the first paragraph beneath the code on page 145. The sentence in the middle of the paragraph should read as follows: “That’s where you’ll design the view in IB, and where you’ll also connect the outlet and set File’s Owner to ‘FileContentsViewController’.” The book mistakenly used ". . . ‘FileOverviewViewController’.

2010-10-21
68TYPO

Text says “Change the Class field to MovieEditorViewController…” however the graphic shows MovieViewController

2010-10-16
73ERROR

I could not find a mention of the need to include
#import “MovieEditorViewController.h”
in MovieViewController.m.

2010-10-16
73ERROR

MovieViewController.m MUST have the following line however I cannot find a mention of this anywhere:
@synthesize editingViewController;

2010-10-16
74TYPO

In the last paragraph, the word “choose” seems like it should have been “chose.”

2010-10-16
35SUGGEST

In the second last paragraph the instructions are confusing. You say, “When you release the mouse, as small HUD (What is a HUD, BTW) window will pop up ……. End the drag by releasing the mouse button..”

What actually happens is that the HUD does not appear until I release the mouse button after hovering over the FIle’s Owner icon. It is then possible to hover over sayHello and select it by clicking again. After that,
not the method, but the File’s Owner icon, flashes.

2010-10-16
159DEFER

I wonder whether using initWithBytesNoCopy might not work properly if the content of the stream has characters that have their representation in UTF8 taking more than 1 byte (non-English languages). Because readBuffer keeps reading chunks of 128 bytes, and code points encoded in UTF8 may take between 1 and 6 bytes, that buffer may end up having an incomplete encoding at the and.

Interesting point. We should revisit this in a future edition (too big a change for simple reprints)
112ERROR

Should sortMoviesArray also call [sortDescriptors release] before it’s done?

2010-10-20
459ERROR

The code download dated 2/3/10 contains an error in the code for the Distance Application in the Location directory.

In particular the file named DistanceViewController.h declares the variables lastUpdate, totalDistance, and averageSpeed to be of UILabel type. They should be of UTTextField type.

2010-10-26
38TYPO

After the second paragraph shouldn’t the index value in the code example be 2 rather than 3?

2010-10-16
55SUGGEST

First sentence of fourth paragraph: “It doesn’t update the hello label or clear the name field, because….”

2010-10-16
68SUGGEST

Did I miss the explanation for the use of “copy” in the @property declarations in Movie.h?

2010-10-16
69TYPO

Shouldn’t the fifth sentence of the first paragraph begin, “Assigning to self what…?” Would also seem helpful to include at least some explanation of the reason for this assignment.

2010-10-16
97TYPO

First paragraph, third sentence: Shouldn’t that be “…support the former…?”

2010-10-20
90SUGGEST

Noob question: In the last sentence on this page is there any particular reason to add the #import “Movie.h” to RootViewController.h rather than RootViewController.m? The header file doesn’t seem to reference the Movie class and previously you’d recommended using @class in the header and #import in the implementation.

2010-10-26
91SUGGEST

Another noob question: Doesn’t the moviesArray instance variable mentioned in the second sentence of the first paragraph also need to be released in the dealloc method?

2010-10-26
97TYPO

First paragraph, fifth sentence: Shouldn’t that be “For the latter…”?

2010-10-26
100SUGGEST

In the second sentence of the third paragraph you suggest adding the #import in the header file where previously you’d suggested using @class in the header and #import in the implementation. Shouldn’t this be consistent?

2010-10-26
100SUGGEST

Fourth paragraph, third sentence: Previously you also had us set the Nib File attribute.

2010-10-26
107SUGGEST

In third paragraph, after describing creation of property for IBOutlet nibLoadedCell you might want to remind people, as you've done several times previously, to also add synthesize in RootViewController.m

111SUGGEST

Fourth paragraph, third sentence: any reason not to add [self handleSortChanged] rather than duplicate its two lines?

112SUGGEST

In the sortMoviesArray method is there some reason not to alloc when declaring sorter instead of repeating the alloc in each of the three cases?

NSSortDescriptor *sorter = [NSSortDescriptor alloc]

132SUGGEST

First ByPopulationViewController.m code snippet: Shouldn’t mention be made that reference to StatesAppDelegate class requires #import of its header file?

131SUGGEST

Shouldn’t there be something similar to the statement in the third paragraph regarding the @property for the states variable to handle the statesByPopulation and statesByArea getters?

133ERROR

Since both the table view data source methods use the view controller’s states getter isn’t the app delegate’s states array going to be sorted six times (once when determining the number of rows in the section and then again each time the cell for a row is being created)?

142SUGGEST

Second bullet point between second and third paragraphs: Previously you’ve suggested using @class when we needed to refer to another class in a header file. If we instead used #import of the other header file then we wouldn’t have to add the #import to our implementation file, would we? Is that what you’re suggesting now?

161TYPO

Last sentence (and related code snippet on the following page): Shouldn’t the final argument be nil (which is the way it’s coded in the initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles invocation of the createNewDirectory method on page 163)?

179TYPO

First paragraph, end of fourth sentence: “…that you should have added earlier.” Can’t seem to find anything earlier suggesting that addition.

191SUGGEST

Is there some reason why conditional tests sometimes evaluate objects for equality/inequality to nil or NULL (as in the two codes samples on this page) while at other times they simply test the object (page 178, first code fragment) or not the object (page 177, second code fragment)?

190SUGGEST

Is there some reason why the code fragment on this page uses NSStrings for the preference specifier keys while the code fragment on page 175 uses #define for the keys to its preferences dictionary?

175SUGGEST

Rather than have the default time zone stored both in the settings file and hard-coded in the app wouldn’t it be more DRY to retrieve that value from the settings file when it hasn’t already been added to the system settings?

196TYPO

Last two sentences of first paragraph seem to assume that a new Xcode project has been created or that the downloadable code for this chapter has been copied.

202SUGGEST

There seems to be nothing in the text identifying the method which is supposed to contain the code fragments on this page and the next page. There’s also no indication as to where this method should be invoked.

201SUGGEST

Penultimate sentence of final paragraph: Any particular reason why this constant name is upper-case? Previous code only used upper-case when implementing constants in #define.

202ERROR

The code fragment doesn’t use the setter for dbFilePath even though the first sentence of the last paragraph on the previous page specifies that dbFilePath is an NSString property. The example code also includes a specific retain which is not included either at the end of the code fragment on this page or at the beginning of the code fragment on the next page.

209TYPO

The last sentence of the second paragraph states that the following code fragment comes from the initWithNibName:bundle: method, but the actual code contains no such method, but instead has the code fragment appearing in the viewDidLoad method.

211TYPO

No other mention (other than the downloaded code itself) of priceFormatter shown in last line of code fragment.

198SUGGEST

The last sentence of the third paragraph concludes “…a label at the bottom that we’ll use to confirm each add.” This confirmation process is not otherwise discussed in the text. In the downloaded code there is additional logic associated with the label (including the changing of its hidden property) that is also not otherwise discussed in the text. The inclusion of at least some minimal details in the text would be helpful.

303TYPO

In the last paragraph before the code, “MPVideoController” should be “MPMoviePlayerController”.

120ERROR

the code sample for “StatesAppDelegate.m” in the download and in the book for “applicationDidFinishLaunching” is missing the last line “[self.window makeKeyAndVisible];”

180TYPO

When instructing to implement a new getter.
End of the second paragraph reads: “… and implement them in Flip- sideViewController.h.”
Shoud read: “… and implement them in Flip- sideViewController.m.”

238ERROR

It seems that due to Framework changes, the code for editing tracks in place doesn’t work anymore. On iOS 4.3, I observe the following:

- self.editing is null, so you cannot really check for it’s value
- tableView:didSelectRowAtIndexPath is NOT fired when table is in a editing mode

Having said that, I fully understand that the book was written for a different iOS version, it’s just some of the information is not relevant anymore.

84TYPO

- (IBAction)edit { self.editingViewController.movie = self.movie; [self presentModalViewController:self.editingViewController animated:YES];
}

causes the system to throw and exception about selector not found

- (IBAction)edit { self.editingViewController.movie = self.movie; [self presentModalViewController:editingViewController animated:YES];
}

works.

Categories: