Related Titles
- Full Description
-
Want to learn how to program on your Mac? Not sure where to begin? Best-selling author Wallace Wang will explain how to get started with Cocoa, Objective-C, and Xcode. Whether you are an experienced Windows coder moving to the Mac, or you are completely new to programming, youll see how the basic design of a Mac OS X program works, how Objective-C differs from other languages you may have used, and how to use the Xcode development environment. Most importantly, youll learn how to use elements of the Cocoa framework to create windows, store data, and respond to users in your own Mac programs. If you want to learn how to develop apps with Cocoa, Objective-C, and Xcode, this book is a great first step.
Here are just a few of the things youll master along the way:
- Fundamental programming concepts aided by short, easy-to-understand examples
- How to use Xcode and related programming tools to save time and work more efficiently
- A firm understanding of the basics of Objective-C and how it compares to other languages you might know
- How to create simple apps using the Cocoa framework
- How to easily design, write, test, and market your finished program
What youll learn
- Basic programming concepts illustrated with short, easy-to-understand examples
- How to use Xcode and related programming tools
- The basics of Objective-C and how it compares to other languages you might know
- How to create simple apps using the Cocoa framework
Who this book is for
Mac users who want to learn programming or Windows developers who are moving to the Mac OS and iOS platforms. No previous programming experience required.
- Table of Contents
-
Table of Contents
- Understanding Programming
- Understanding Apples Programming Tools
- The Basic Steps to Creating a Mac Program
- Getting Help
- Learning Objective-C
- Making Decisions with Branches
- Repeating Code with Loops
- Understanding the Cocoa Framework
- Manipulating Strings
- Arrays
- Dictionaries and Sets
- Creating Classes and Objects
- Inheritance, Method Overriding, and Events
- Creating a User Interface
- Choosing Commands with Buttons
- Making Choices with Radio Buttons and Check Boxes
- Making Choices with Pop-Up Buttons
- Inputting and Outputting Data with Labels, Text Fields, and Combo Boxes
- Inputting Data with Sliders, Date Pickers, and Steppers
- Using Built-In Dialog Boxes
- Creating Pull-Down Menus
- Designing Your Own Programs
- Working with Xcode
- Debugging Your Program
- Source Code/Downloads
- Errata
-
If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.
On page Chapter 3 epub:In chapter 3 in the epub-book under "Creating an Action Method" following lines missing a space:
@property (assign) IBOutletNSWindow *window;
@property (assign) IBOutletNSTextField *message;
Should be:
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet NSTextField *message;
Its ok in the PDF-version on page: 39
Have checked in two epub softwares.
On page Chapter 3 epub:Missing space in epub-version at following lines under "An Advanced Interactive User Interface Example":
@property (assign) IBOutletNSWindow *window;
@property (assign) IBOutletNSTextField *message;
@property (assign) IBOutletNSTextField *inputData;
Sholud be:
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet NSTextField *message;
@property (assign) IBOutlet NSTextField *inputData;
Ok in PDF-version in page 43
On page 34-36:I installed the latest version of xcode and am having trouble following the first example that connects a text field and a button. The book asks me to edit a source file but there are already differences between what I have in xcode and what I see in the book (for the sections that I'm not supposed to edit).
I have xcode 4.2.1 if that helps. Will these examples run on that version of xcode?
On page 68:Center of page, last sentence of first paragraph under "Defining Compiler Directives..."
"The most common compiler directive appears in front of the import keyword:"
The element that appears in front of the import keyword is the # sign, which certainly is very common, but not itself a compiler directive. The sentence should probably read "The most common compiler directive is import:".
Or perhaps better, "... #import:" - in conjunction with some re-wording of the preceding sentence, as follows:
"...sometimes you may need to give the compiler special instructions. These are called directives and are identified by a leading # sign. The most common is #import:"
(Which also avoids explicitly misidentifying the directive as a compiler directive. It's splitting hairs, I know, but technically #import is a preprocessor directive; compiler directives have a leading @ sign. See Appendix A in Apple's Objective-C Programming Language manual.)
On page 81:Center of page
"For leaving comments... you use the // and /* and */ symbols for multiple lines."
This implies that you use all of those ("...// and /* and */...") for multiple lines.
Better: "...you use // for single lines, and /* and */ for multiple lines."
On page 187:
page 187, first line:
-(void)displayMessage: (NSString *) myName count:(int)myLoop;
{
I think that the ";" must not be there.
On page 376:Note at bottom of page
("[Cmd]" in the following represents the Command key symbol)
"...press [Cmd]+/ (in other words, press the Command key followed by the + key followed by the / key)"
That will not work - the plus sign is not part of the keyboard shortcut sequence.
At a minimum, the words "followed by the + key" should be removed from the clarification. Better yet, change the wording to "...hold down the Command key and press the / key", because "...followed by..." can be taken to mean that the keys can be pressed and released one after the other. That works for ALT sequences in Windows, but this is not the ALT key. Or Windows.
Also, for consistency (see examples at the top of the page and elsewhere), change "[Cmd]+/" to "[Cmd]/".




