Addison Wesley Cocoa Programming For Mac

Posted on

Description The best-selling introduction to Cocoa, once again updated to cover the latest Mac programming technologies, and still enthusiastically recommended by experienced Mac OS X developers. “Aaron’s book is the gold standard for Mac OS X programming books—beautifully written, and thoughtfully sculpted. The best book on Leopard development.” —Scott Stevenson, “This is the first book I’d recommend for anyone wanting to learn Cocoa from scratch. Aaron’s one of the few (perhaps only) full-time professional Cocoa instructors, and his teaching experience shows in the book.” —Tim Burks, software developer and creator of the Nu programming language, “If you’re a UNIX or Windows developer who picked up a Mac OS X machine recently in hopes of developing new apps or porting your apps to Mac users, this book should be strongly considered as one of your essential reference and training tomes.” —Kevin H. Spencer, Apple Certified Technical Coordinator If you’re developing applications for Mac OS X, Cocoa® Programming for Mac® OS X, Third Edition, is the book you’ve been waiting to get your hands on.

If you’re new to the Mac environment, it’s probably the book you’ve been told to read first. Covering the bulk of what you need to know to develop full-featured applications for OS X, written in an engaging tutorial style, and thoroughly class-tested to assure clarity and accuracy, it is an invaluable resource for any Mac programmer. Specifically, Aaron Hillegass introduces the three most commonly used Mac developer tools: Xcode, Interface Builder, and Instruments. He also covers the Objective-C language and the major design patterns of Cocoa.

Aaron illustrates his explanations with exemplary code, written in the idioms of the Cocoa community, to show you how Mac programs should be written. After reading this book, you will know enough to understand and utilize Apple’s online documentation for your own unique needs. And you will know enough to write your own stylish code. Updated for Mac OS X 10.4 and 10.5, this revised edition includes coverage of Xcode 3, Objective-C 2, Core Data, the garbage collector, and CoreAnimation. Table of Contents Preface xvii Acknowledgments xix Chapter 1: Cocoa: What Is It? 1 A Little History 1 Tools 3 Language 4 Objects, Classes, Methods, and Messages 4 Frameworks 6 How to Read This Book 6 Typographical Conventions 7 Common Mistakes 7 How to Learn 8 Chapter 2: Let’s Get Started 9 In Xcode 9 In Interface Builder 13 Back in Xcode 23 Documentation 29 What Have You Done? 30 Chapter 3: Objective-C 33 Creating and Using Instances 33 Using Existing Classes 35 Creating Your Own Classes 46 The Debugger 58 What Have You Done?

62 For the More Curious: How Does Messaging Work? 62 Challenge 64 Chapter 4: Memory Management 65 Turning the Garbage Collector On and Off 66 Living with the Garbage Collector 68 Living with Retain Counts 68 What Have You Done?

Description. Copyright 2004. Dimensions: 7x9-1/4. Pages: 480.

Edition: 2nd. Premium Website. ISBN-10: 0-321-21314-9. ISBN-13: 978-0-321-21314-3 A new edition of this title is available, ISBN-10: ISBN-13: 619 The highly acclaimed introduction to Cocoa–recommended most by experienced Mac OS X developers now updated and expanded. Here's what critics said about the first edition: 'Reading this book is the absolute best way to learn how to harness the power of this amazing technology.'

– Andrew Stone, President, Stone Design, www.stone.com 'Make sure this is the first one you pick up. It's the best book for a beginning Cocoa programmer.' –From the review on HyperJeff.net& 'I love this book. The descriptions are clear, the examples logical. Everything a programmer needs to get up to speed on Cocoa.' – Dave Mark, Editor, MacTech Magazine To help programmers develop applications for Mac OS X, Apple is now giving away XCode, Interface Builder, and the Cocoa frameworks–the tools used to create Safari, GarageBand, Mail, and the iApps.

Addison Wesley Cocoa Programming For Mac Os

Cocoa® Programming for Mac® OS X, Second Edition, will give you a complete understanding of how to use these tremendously powerful tools and frameworks to write full-featured applications for the Mac. Guiding programmers through the key features of Cocoa, this book emphasizes design patterns that enable you to predict the behavior of classes you have never used before. Written in a tutorial format, it takes you step-by-step through the creation of six applications and an Interface Builder palette. Each project introduces several new ideas, and as each concept or technique is discussed, the author, drawing on his own extensive experience, shows you the right way to use it. Updated for Xcode and Mac OS X 10.3, new chapters in this second edition include coverage of OpenGL, AppleScriptability, the undo manager, creating frameworks, and a brief introduction to using GNUstep on Linux. Sample Content Online Sample Chapter Downloadable Sample Chapter Download the related to this title. Table of Contents 1.

Cocoa: What Is It? A Little History. Objects, Classes, Methods, and Messages. How to Read This Book. Typographical Conventions. Common Mistakes. How to Learn.

Let's Get Started. Create a New Project. The main Function.

In Interface Builder. The Standard Palettes.

The Blank Window. Lay Out the Interface.

The Doc Window. Create a Class. Create an Instance. Make Connections. Back in Xcode.

Types and Constants in Objective-C. Look at the Header File.

Edit the Implementation File. Build and Run.

What Have You Done? Creating and Using Instances. Using Existing Classes.

Memory Management: Retain Count, Releasing, and Retaining. Sending Messages to nil. NSObject, NSArray, NSMutableArray, and NSString. 'Inherits from' Versus 'Uses' or 'Knows About'.

Creating Your Own Classes. Creating the LotteryEntry Class. Changing mainm. Implementing a description Method. Writing Initializers. Initializers with Arguments. The Debugger.

What Have You Done? For the More Curious: How Does Messaging Work? Some Commonly Used Subclasses of NSControl. Start the SpeakLine Example. Lay Out the Nib File. Making Connections in Interface Builder. Implementing the AppController Class.

Extending an Existing User Interface. For the More Curious: Setting the Target Programmatically. Helper Objects. The NSTableView and Its dataSource. AppController Interface File. Lay Out the User Interface.

Make Connections. Edit AppControllerm. Common Errors in Implementing a Delegate.

Many Objects Have Delegates. Retain Cycles. For the More Curious: How Delegates Work. Bindings and NSController. Starting the RaiseMan Application. Key-Value Coding.

In Interface Builder. Key-Value Coding and nil.

For the More Curious: Sorting Without NSArrayController. For the More Curious: Key Paths. How the NSUndoManager Works.

Adding Undo to RaiseMan. Key-Value Observing. Undo for Edits.

For the More Curious: Windows and the Undo Manager. NSCoder and NSCoding. The Document Architecture. Infoplist and NSDocumentController. Saving and NSKeyedArchiver.

Loading and NSKeyedUnarchiver. Setting the Extension and Icon for the File Type.

For the More Curious: Preventing Infinite Loops. For the More Curious: Versioning.

For the More Curious: Creating a Protocol. For the More Curious: Document-Based Applications Without Undo. Nib Files and NSWindowController. Adding a Panel to the Application.

Setting Up the Menu Item. For the More Curious: NSBundle. User Defaults.

NSDictionary and NSMutableDictionary. Precedence of Different Types of Defaults. Setting the Identifier for the Application. Creating Keys for the Names of the Defaults.

Registering Defaults. Let the User Edit the Defaults. Using the Defaults. Suppressing the Creation of Untitled Documents. Setting the Background Color on the Table View. For the More Curious: Reading and Writing Defaults from the Command Line.

Using Notifications. What Notifications Are. What Notifications Are Not.

Posting a Notification. Registering as an Observer. Unregistering the Observer. Handling the Notification When It Arrives. For the More Curious: Delegates and Notifications.

For the More Curious: The userInfo Dictionary. Using Alert Panels. Make the User Confirm the Deletion. Localizing a Nib File. String Tables. Creating String Tables. Using the String Table.

For the More Curious: nibtool. For the More Curious: Explicit Ordering of Tokens in Format Strings. Custom Views. The View Hierarchy. Get a View to Draw Itself.

Create an Instance of a View Subclass. Drawing with NSBezierPath.

For the More Curious: Cells. For the More Curious: isFlipped. Images and Mouse Events.

Getting Mouse Events. Using NSOpenPanel. Change the Nib File. AwakeFromNib Versus init. Edit the Code. Composite an Image onto Your View. The View's Coordinate System.

For the More Curious: NSImage. Responders and Keyboard Events.

Create a New Project with a Custom View. Edit the Nib File. Write the Code. For the More Curious: Rollovers. Working with Fonts and NSAttributedString.

Commonly Used Methods in NSFont. Drawing Strings and Attributed Strings. Making Letters Appear. Getting Your View to Generate PDF Data. For the More Curious: NSFontManager.

Addison wesley cocoa programming for mac 10

Pasteboards and Nil-Targeted Actions. Add Cut, Copy, and Paste to BigLetterView. Nil-Targeted Actions.

Looking at the Nib File. For the More Curious: Which Object Really Sends the Action Message? For the More Curious: Lazy Copying. Add a Method to NSString. For the More Curious: Declaring Private Methods. Make BigLetterView Be a Drag Source.

After the Drop. Make BigLetterView Be a Drag Destination. Add Highlighting. Implement the Dragging Destination Methods. Lay Out the Interface. Make Connections.

Adding Code to AppController. For the More Curious: NSRunLoop. Adding a Sheet.

Add Outlets and Actions. Lay Out the Interface. For the More Curious: contextInfo. For the More Curious: Modal Windows. For the More Curious: Alert Sheets.

For the More Curious: NSDrawer. Creating NSFormatters.

A Basic Formatter. Edit the Interface File for the AppController Class. Edit the Nib File. Searching Strings for Substrings.

Create a Subclass of NSFormatter. The Delegate of the NSControl. Checking Partial Strings. Formatters That Return Attributed Strings.

Adding Printing to TypingTutor. Dealing with Pagination. For the More Curious: Am I Drawing to the Screen? Using ObjectAlloc. Updating Menus.

Making a BigLetterView Uncopyable. For the More Curious: Menu Delegates. Working with NSTextView.

Messages the Delegate Will Be Sent. Build the Editor with Which This Book Was Written. Read, Write, and Edit Text Files.

Add a Context-Sensitive Menu. Replace the Selection. For the More Curious: The Field Editor. Creating Interface Builder Palettes. Add NSCoding Methods to BigLetterView. Create a Palette Project. Edit the Nib File for Your Palette.

Build and Test. Adding an Inspector. Create a Nib File for Your Inspector.

Code for an Inspector. Adding Bindings to a Custom View. For the More Curious: How to Palettize Objects That Are Not Views. Making an Application AppleScript-able. Create the Plists.

Wesley

Handling the Apple Events. Cocoa and OpenGL. A Simple Cocoa/OpenGL Application. Creating Frameworks. Create a Framework. Embed the Framework in an Application.

Compile the Framework for Embedding. Compile the Application with the Framework.

Addison Wesley Cocoa Programming For Mac

Creating a System That Will Run GNUstep Applications. Building and Starting the Development Tools.

Creating the RandomApp with GNUstep. Index Download the file related to this title.