Building Cocoa Applications: A Step by Step Guide: A Step by Step Guide

Building Cocoa Applications: A Step by Step Guide: A Step by Step Guide

Building Cocoa Applications: A Step by Step Guide: A Step by Step Guide

Building Cocoa Applications: A Step by Step Guide: A Step by Step Guide

Paperback(First Edition)

$64.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

Cocoa is an object-oriented development environment available in Apple's Mac OS X environment. Mac OS X, a unified operating system and graphical operating environment, is the fastest growing Unix variant on the market today. Hard-core Unix programmers, developers who cut their teeth on classic Mac operating systems, and developers who cherished NeXTSTEP, the decade-old system on which today's Cocoa is based — all are flocking to Cocoa, and they need a lot more practical information than is currently available from Apple. There is a lot to learn. Building Cocoa Applications is an ideal book for serious developers who want to write programs for the Mac OS X using Cocoa. It's a no-nonsense, hands-on text that's filled with examples — not only simple and self-contained examples of individual Cocoa features, but extended examples of complete applications with enough sophistication and complexity that readers can put them to immediate use in their own environments. Building Cocoa Applications takes a step-by-step approach to teaching developers how to build real graphics applications using Cocoa. By showing the basics of an application in one chapter and then layering additional functionality onto that application in subsequent chapters, the book keeps readers interested and motivated. Readers will see immediate results, and then go on to build onto what they've already achieved. The book is divided into four major parts: Part I introduces the Mac OS X graphical user interface (Aqua) from a developer's point of view, Cocoa developer tools (such as the Interface Builder, Project Builder, and gdb debugger), object-oriented concepts, the Objective-C language in which Cocoa is written, and the basics of Cocoa programming itself. Part II focuses on building the first complete application, Calculator, a simple four-function calculator. The chapters in this part of the book extend the application, piece by piece, by introducing such features as nibs, icons, delegation, resizing, events, and responders. Part III focuses on building an application called MathPaper, which is similar to a word processor but which instead solves mathematical expressions the user supplies. The chapters in this part of the book extend MathPaper by developing both the front and back ends using a variety of Cocoa classes and methods. They introduce Cocoa'sdocument-based architecture, tasks, pipes, Rich Text format, handling document files, and using Quartz to draw in windows. Part IV focuses on building the GraphPaper application, a more complex multithreading application that graphs mathematical functions in multiple dimensions and that uses mouse-over capabilities to identify graph points. The chapters in this part of the book add more advanced Mac OS X features such as multithreading, color, mouse events, zoom buttons, pasteboards, services, preferences, and the defaults database. By the end of the book, readers who have built the applications as they have read will have a solid understanding of what it really means to develop complete and incrementally more complex Cocoa applications. The book comes with extensive source code available for download from the O'Reilly web site, along with an appendix listing additional resources for further study.

Product Details

ISBN-13: 9780596002350
Publisher: O'Reilly Media, Incorporated
Publication date: 05/01/2002
Edition description: First Edition
Pages: 646
Product dimensions: 7.00(w) x 9.19(h) x 1.19(d)

About the Author

Simson Garfinkel, CISSP, is a journalist, entrepreneur, and international authority on computer security. Garfinkel is chief technology officer at Sandstorm Enterprises, a Boston-based firm that develops state-of-the-art computer security tools. Garfinkel is also a columnist for Technology Review Magazine and has written for more than 50 publications, including Computerworld, Forbes, and The New York Times. He is also the author of Database Nation; Web Security, Privacy, and Commerce; PGP: Pretty Good Privacy; and seven other books. Garfinkel earned a master's degree in journalism at Columbia Universityin 1988 and holds three undergraduate degrees from MIT. He is currently working on his doctorate at MIT's Laboratory for Computer Science.

Michael K. Mahoney is Dean of the College of Engineering at California State University, Long Beach, where he is also a Professor of Computer Engineering and Computer Science. Formerly, he was the Associate Vice President for Academic Information Technology and Chair of the Department of Computer Engineering and Computer Science. Dr. Mahoney started programming at NeXT Computer, Inc. in January 1989 and coauthored (with Simson Garfinkel) NeXTSTEP Programming, Step One: Object-Oriented Applications (Springer-Verlag). He has given presentations on object-oriented programming and NeXTSTEP's Interface Builder at ACM meetings in Seattle, Los Angeles, Monterey, and New Orleans. Before becoming dean, he regularly taught university courses in computer graphics, user interface design, object-oriented programming, discrete mathematics, and web development. He has supervised eight Master's theses. Mahoney earned his Ph.D. in mathematics at the Universityof California, Santa Barbara, in 1979. He has published papers in computer graphics, computer science education, and mathematics. He has won campuswide teaching awards at both UCSB and CSULB. His web site is http://www.csulb.edu/~mahoney/.

Table of Contents

Dedication; Preface; Cocoa and Mac OS X; Organization of This Book; What You Will Need; Conventions Used in This Book; Comments and Questions; Acknowledgments; Cocoa Overview; Chapter 1: Understanding theAqua Interface; 1.1 What Makes Mac OS X So Special?; 1.2 A Quick Look at the Mac OS X User Interface; 1.3 Basic Principles of the Aqua Interface; 1.4 The Mouse and Cursor; 1.5 Window Types and Behavior; 1.6 Menus and the Menu Bar; 1.7 The Dock; 1.8 Controls; 1.9 The Finder; 1.10 Configuring Your Desktop, Step by Step; 1.11 Menu Guidelines and Keyboard Equivalents; 1.12 Working with the Filesystem,Step by Step; 1.13 Summary; 1.14 Exercises; 1.15 References; Chapter 2: Tools for Developing Cocoa Applications; 2.1 Developer Tools; 2.2 Utilities; 2.3 Working with the Terminal; 2.4 Debugging Programs with gdb; 2.5 User Interface Design; 2.6 Summary; 2.7 Exercises; Chapter 3: Creating a Simple Application with Interface Builder; 3.1 Getting Started with Interface Builder; 3.2 Adding Objects to Your Application; 3.3 Objects, Messages, and Targets; 3.4 Summary; 3.5 Exercise; Chapter 4: An Objective-C ApplicationWithout Interface Builder; 4.1 The Tiny.m Program; 4.2 An Introduction to Objective-C; 4.3 Tiny.m Revisited; 4.4 Summary; 4.5 Exercises; 4.6 References; Calculator: Building a Simple Application; Chapter 5: Building a Project: A Four-Function Calculator; 5.1 Getting Started: Building the Calculator Project; 5.2 Building the Calculator’s User Interface; 5.3 Building the Calculator’s Controller Class; 5.4 Customizing Buttons and Making Connections; 5.5 Compiling and Running a Program; 5.6 Compiler Error Messages; 5.7 The enterDigit: Action Method; 5.8 Adding the Four Calculator Functions; 5.9 Adding the Unary Minus Function to the Controller Class; 5.10 The Files in a Project; 5.11 Summary; 5.12 Exercises; Chapter 6: Nibs and Icons; 6.1 Customizing MainMenu.nib; 6.2 Managing Multiple Nibs; 6.3 Adding Icons to Applications; 6.4 Changing Calculator’s Application Icon; 6.5 Cocoa’s NSImage Class; 6.6 Summary; 6.7 Exercises; 6.8 References; Chapter 7: Delegation and Resizing; 7.1 Handling Different Bases; 7.2 Delegation; 7.3 Disabling Buttons for BetterMultiradix Input; 7.4 Resizing Windows Programmatically; 7.5 Two Very Important Classes: NSWindow and NSView; 7.6 Summary; 7.7 Exercises; Chapter 8: Events and Responders; 8.1 Events and the NSResponder Chain; 8.2 Events and the NSApplication Object; 8.3 The Event Loop; 8.4 Catching Keyboard Eventsfor Our Calculator; 8.5 Summary; 8.6 Exercises; 8.7 References; Chapter 9: Darwin and the Window Server; 9.1 Unix, Mach, and the Mac OS X Environment; 9.2 The Window Server and Quartz; 9.3 Seeing All the Processes; 9.4 Summary; 9.5 Exercises; 9.6 References; MathPaper: A Multiple-Document, Multiprocess Application; Chapter 10: MathPaper and Cocoa’sDocument-Based Architecture; 10.1 The MathPaper Application; 10.2 The Evaluator Back End; 10.3 Cocoa’s Document-Based Architecture; 10.4 Building MathPaper’s Front End; 10.5 Summary; 10.6 Exercises; 10.7 References; Chapter 11: Tasks, Pipes, and NSTextView; 11.1 Processes, Pipes, and Resources; 11.2 Making Evaluator a MathPaper Auxiliary Executable; 11.3 MathDocument Class Modifications; 11.4 Creating PaperController, a Subclass of NSWindowController; 11.5 The NSScrollView and NSTextView Classes; 11.6 PaperController Class Modifications; 11.7 Summary; 11.8 Exercises; Chapter 12: Rich Text Format and NSText; 12.1 Rich Text Format; 12.2 Creating an RTF Class; 12.3 Integrating Our RTF Class into MathPaper; 12.4 Summary; 12.5 Exercises; Chapter 13: Saving, Loading, and Printing; 13.1 Data Management with NSDocument; 13.2 Saving to a File; 13.3 Loading from a File; 13.4 Marking a Document Window as Edited; 13.5 Adding Printing Capability; 13.6 Summary; 13.7 Exercises; Chapter 14: Drawing with Quartz; 14.1 Animation in an About Panel; 14.2 The Quartz Window Server; 14.3 Implementing the About Panel in MathPaper; 14.4 Quartz Graphics Data Types; 14.5 Timers; 14.6 Putting It All Together; 14.7 Summary; 14.8 Exercises; 14.9 References; Chapter 15: Drawing in a Rectangle: More Fun with Cocoa Views; 15.1 The Advantages of NSView’s drawRect: Method; 15.2 BlackView: An NSView That Paints Itself Black; 15.3 A Closer Look at the NSView Class; 15.4 BarView: An NSView with a Scaled Coordinate System; 15.5 PolygonView: A Non-Opaque NSView; 15.6 Responding to Events in an NSView; 15.7 Autosizing Multiple Views in a Window; 15.8 Summary; 15.9 Exercises; GraphPaper: A Multithreaded, Mouse-Tracking Application; Chapter 16: GraphPaper: A Multithreaded Application with a Display List; 16.1 GraphPaper’s Design; 16.2 Working with Multiple Threads; 16.3 Building the GraphPaper Application; 16.4 Extending the Display List; 16.5 Summary; 16.6 Exercises; 16.7 References; Chapter 17: Color; 17.1 Colors and Color Objects; 17.2 Adding Color to GraphPaper; 17.3 Summary; 17.4 Exercises; Chapter 18: Tracking the Mouse; 18.1 Tracking the Mouse; 18.2 Adding Mouse Tracking to GraphPaper; 18.3 Summary; 18.4 Exercises; 18.5 References; Chapter 19: Zooming and Saving Graphics Files; 19.1 Adding a Zoom Button to GraphPaper; 19.2 Saving to PDF; 19.3 Saving to TIFF; 19.4 Creating an Accessory NSView; 19.5 Summary; 19.6 Exercises; Chapter 20: Pasteboards, Services, Modal Sessions, and Drag-and-Drop; 20.1 Cut, Copy, and Paste with the Pasteboard; 20.2 Using the Pasteboard in GraphPaper; 20.3 Services; 20.4 Creating Your Own Service; 20.5 Drag-and-Drop; 20.6 Summary; 20.7 Exercises; Chapter 21: Preferences and Defaults; 21.1 Preferences and the Defaults Database System; 21.2 Adding Defaults to GraphPaper; 21.3 Making the Preferences Panel Work with Defaults; 21.4 Setting Up a Multi-View Panel; 21.5 Summary; 21.6 Exercises; Cocoa Resources; Apple Resources; Third-Party Resources; Colophon;
From the B&N Reads Blog

Customer Reviews