Related Titles
- Full Description
-
Take your coding skills to the next level with this extensive guide to ObjectiveC, the native programming language for developing sophisticated software applications for Mac OS X. ObjectiveC is a powerful, objectoriented extension of C, making this book the perfect followup to Dave Marks bestselling Learn C on the Mac, Mac OS X Edition. Whether youre an experienced C programmer or youre coming from a different language such as C++ or Java, leading Mac experts Mark Dalrymple and Scott Knaster show you how to harness the powers of ObjectiveC in your applications!
- A complete course on the basics of ObjectiveC using Apples free Xcode tools
- An introduction to objectoriented programming
- Comprehensive coverage of inheritance, composition, object initialization, categories, protocols, memory management, and organizing source files
- A brief tour of Cocoas foundation framework and AppKit
- A helpful learning curve guide for nonC developers
What youll learn
- Learn ObjectiveC programming, the gateway to programming your Mac or iPhone
- Write applications for the Mac OS X interface, the cleanest userinterface around
- Understand variables and how to design your own data structures
- Work with the file system
- Connect to data sources and the Internet
Who this book is for
For anyone wanting to learn to program native applications in Mac OS X, including developers new to the Mac, developers new to ObjectiveC, or students entirely new to programming.
- 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 Chapt 3 - Starting with Shapes-Object-1:
Problem building sample code when starting with XCode 4.2 new project.
System - MacBook Pro - Spring 2011
Mac OS X Lion 10.7.2 (11C74)
XCode 4.2 (4D199)
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Project Build Settings
Under Apple LLVM compiler 3.0 Language
Objective-C Automatic Reference Counting defaults to "Yes" for new projects
shows up as: CLANG_ENABLE_OBJC_ARC
Must be set to no for successful build, resulting in the following option set for the project.
CLANG_ENABLE_OBJC_ARC = NO
If not, the following errors result and the project build fails.
/Users/terje/devel/learnobjectiveC_24x7/Shaped-Object/Shapes-Object/main.m:33:11: warning: no previous prototype for function 'colorName' [-Wmissing-prototypes,3]
/Users/terje/devel/learnobjectiveC_24x7/Shaped-Object/Shapes-Object/main.m:187:21:{187:18-187:29}: error: must explicitly describe intended ownership of an object array parameter [4]
/Users/terje/devel/learnobjectiveC_24x7/Shaped-Object/Shapes-Object/main.m:187:6: warning: no previous prototype for function 'drawShapes' [-Wmissing-prototypes,3]
/Users/terje/devel/learnobjectiveC_24x7/Shaped-Object/Shapes-Object/main.m:222:14:{222:14-222:20}: error: passing '__strong id *' to parameter of type '__unsafe_unretained id *' changes retain/release properties of pointer [3]
33: NSString *colorName (ShapeColor color)
187: void drawShapes (id shapes[], int count)
222: drawShapes (shapes, 3);
Loading the downloaded XCode project works fine after changing the SDK to SnowLeopard (10.6.x) or Lion (10.7.x)
The warnings regarding missing prototypes can be eliminated by modifying the warnings settings:
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO
On page 1:
The downloads are based on SDK Mac OS X 10.5. The current version of Xcode returns and error message "The run destination My Mac 64-bit is not valid for Running the scheme '03.02 Count-2'." For each program you need to change the validate setting so you can run the programs. Probably it is worth mentioning in the starting chapter. I found it out in user forums how to change others may just put the book aside.
On page 187:[engine release]; is not shown on the updated version of main().
It does appear when its being explains line by line on page 188, but it does not appear in the full version on 187.
You did not release! Bad memory management!
Great book so far! Thanks.
Nadav






