6/27/09 Chapter 3 tutorial

Beginning iPhone Development bookI went over the Beginning iPhone Development book, chapter 3, underlining and generally marking up the book. I carefully noted each step with a circled digit in the margin. Where it referred to steps to take in the previous chapter, I noted the page numbers of that chapter in the margin in the appropriate place. This will help me later when I actually do the coding on the Mac.

The tutorial in chapter 3 tells you you to make two buttons at top and label them Left and Right.  When all the coding is finished, you click on the Left button, and the text at the bottom will say “Left button pressed.” The text will say “Right button pressed” when the Right button is pressed.

I notice on page 35 a slice of code schematic that would be incomprehensible to anyone who has never coded before. That cod schematic is used to help you understand the code that follows. For that reason, this book assumes the reader has some familiarity with coding. Luckily, my experience in PHP helped me understand the code perfectly. When the schematic is repeated on p38 in actual code, I was able to look back to page 35 to understand its structure. It did not slow me down.

Something else slowed me down, though. After I entered the code from page 38 and compiled it (“compiling” is when the compiler software translates your English coding into the zeroes and ones the device needs to execute the code), it generated 6 errors. Carefully looking over the page, I found the page containing less text than what the book shows. I added the extra code the book assumed was there, compiled again, and this time generated one error. I went to the book’s forum, registered, and sent in that bit to see what the response would be. I am at step 8 (p41) out of 24 steps needed to finish this tutorial.

I downloaded the Mac OSX version of the free Gimp image editing software and it runs great.

I finished the tutorial (still had one error, so it did not compile). If your code has errors, it will simply refuse to budge an inch until you get it right. Apple’s high standards in action!

I went back to Gimp and created an icon for the earlier tutorial. (I have been using Photoshop on the PC, so I looked for similar features and had little problem making my way around the program.) Worked like a charm! It appeared in the iPhone Simulator. When I clicked on it with the mouse, my app opened with “Hello World!” as it should.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.