Mac OSX Developer's Guide - 1st Edition - ISBN: 9780122513411, 9780080510521

Mac OSX Developer's Guide

1st Edition

Authors: Jesse Feiler
eBook ISBN: 9780080510521
Imprint: Morgan Kaufmann
Published Date: 5th October 2001
Page Count: 594
Sales tax will be calculated at check-out Price includes VAT/GST
Price includes VAT/GST

Institutional Access

Secure Checkout

Personal information is secured with SSL technology.

Free Shipping

Free global shipping
No minimum order.


Mac OS X, Apple's newest operating system for the Macintosh platform, is profoundly different from its earlier versions because of its similarity to the UNIX operating system. For developers writing software for OS X this means adjusting to two new environments to create applications and to access the enhanced features of the new OS, Cocoa and Carbon. Cocoa is an object-oriented API in which all future OS X programs will be written. Carbon is a transitional technology allowing compatibility of applications written for earlier versions of the Mac OS with Mac OS X.

Mac OS X Developer's Guide focuses equally on Cocoa and Carbon, guiding the reader through these technologies and showing how to write applications in both. It is the first book for Mac OS X developers written for those who are already working on applications, as well as new developers just getting started. It starts off describing the new OS and its development tools then focuses on specific programming issues, providing tips on making the transition from classic Mac OS code to Mac OS X.

Key Features

  • A guide for developers already writing applications as well as new developers just getting started
  • Focuses equally on both Cocoa and Carbon environments
  • Provides tips on transitioning from writing code for classic Mac OS to OS X
  • References Apple online materials extensively, to keep developers up to speed on changes


Apple Macintosh OS Developers

Table of Contents

Preface. Other Documentation. Aqua Interface Elements. About the Book. Acknowledgments. Introducing Mac OS X: 1. Introduction. Who Is a Programmer? The Search for Better Ways to Write Software Improving the Production of Code Reusing Code System Software Abstraction The Evolution of Software Increasing Complexity of Software Software for the Twenty-first Century Summary 2. Architecture Overview. The Story So Far... Personal Computer Operating Systems Sharing Modern Operating Systems Security Process Management Memory Management Communication Between and Among Processes Failure and Exception Handling Kernel Architecture Mach Tasks and Threads Memory Management Communication Between and Among Tasks Mach and Other Operating Systems The Evolution of Mac OS X The Beginnings of Operating Systems Common Interfaces Managing Changes The Object-Oriented/Flat World Boundary Splitting the Operating System Summary 3. Frameworks and Object-Oriented Programming. Object-Oriented Programming Why Is It Liked? Where Are the Benefits? The Learning Curve Objects Object-Oriented Design Issues Inheritance Polymorphism Data Hiding and Encapsulation What It Means—No If Statements An Example Performance Run-Time Issues Dynamism Managing Objects in Memory Frameworks Summary 4. The Languages of Mac OS X: Java. The Look of Java Unicode Java Isn't C Everything Is an Object Object Class Some Java Syntax Inheritance and Organization in Java Packages Frameworks and Java Exception Handling The Java Bridge Bridge Performance Issues Finding Java Headers Summary 5. The Languages of Mac OS X: Objective-C. Object-Oriented Programming Languages: Two Directions Objects and Messages The Look of the Languages Dynamism Dynamic Typing Dynamic Binding Dynamic Linking Class and Instance Objects Creating New Instances Using Class Objects Protocols Categories Keeping It Running Syntax Summary 6. The Languages of Mac OS X: C++. The C++ Objective Consequences of Compile-Time Typing Small Objects Are Not Expensive The Fragile Base Class Problem Run-time Type Identification and Exception Handling Multiple Inheritance The History of Multiple Inheritance in C++ C++ Delegation Using Objective-C and C++ Together (Objective-C++) Summary 7. The Frameworks of Mac OS X: Cocoa. Programming Design Terminology Objects Events Actions Responders Responder Chain Delegates Outlets Connections Actions AppKit Interface Fonts Graphics Color Documents Printing Operating System International Interface Builder Foundation NSObject Values Strings Collections Operating System Services Notifications Archiving Objective-C Language Services Scripting Distributed Objects Summary 8. The Frameworks of Mac OS X: Carbon. Where Carbon Fits In Classic Mach-O and CFM Carbon as a Mac OS X Preview Carbon as a Classic Porting Tool Carbon for Good Code Carbon for Maintenance Carbon Frameworks Carbon Frameworks Application Services Core Services Carbon Events Old-Style Events (WaitNextEvent) Direct Dispatching with Carbon Events Summary 9. The Frameworks of Mac OS X: Core Foundation and Apple Class Suites. Core Foundation Core Foundation Syntax Opaque Types Creating and Copying Core Foundation Objects Memory Management and Thread Safety Core Foundation Services Apple Class Suites MacApp MacApp Design Considerations Browsing MacApp in CodeWarrior Differences Between MacApp and Cocoa Summary Designing for Mac OS X: 10. Planning Your Project. Set Your Objectives Justify the Project Develop Proofs-of-Concept Know Your User Use Appropriate Language Build a Usable Interface Consider the Non-Interactive User Building on the Past Choose Your Resources People Development Environment Framework Language Use Mac OS X Features User Experience Application Structure Summary 11. The Tools of Mac OS X: Project Builder. Getting Started with Project Builder Using an Integrated Development Environment (IDE) Where Project Builder Comes From When to Use Project Builder Using the Command Line Using Project Builder Project Structure Pane Editor Pane Tool Pane Configuring the Toolbar Creating a New Project Creating a New File Building Projects Files and Build Phases Build Settings Application Settings Executables Build Styles Using Targets Building From the Command Line Working with CodeWarrior Using CodeWarrior with MacApp Exporting Projects from CodeWarrior Summary 12. The Tools of Mac OS X: Interface Builder. Interface Builder Overview Cocoa and Carbon Nibs Main Nib File Additional Nib Files Hooks for Nib File Creation Nib Windows in Interface Builder Using Interface Elements Menus Connecting Interface Elements for Actions Windows Connecting Interface Elements for Outlets Views Designing with Interface Builder Programming for Interface Builder Actions Outlets Connecting Outlets First Responder Instantiating Controllers and Other Objects Using Interface Builder with Carbon Working with Interface Builder and Carbon Programming for Carbon Nibs Summary 13. Prototyping and Testing The Roles of Prototypes Prototyping Development Tools Visualization of Concepts Process Definition Advance Versions Training Skunkworks Shaping the Interface Using Interface Builder for Prototypes Using Interface Labs Preserving Innocents Testing Unit Testing System Testing Primary Functionality Testing Failures Testing Interface Errors Test Suites and Regression Testing Public/Beta Testing User Testing Summary 14. Developing Help and Assistance. Providing Help Documentation Advertising Onscreen Information Aspects of Help Help Buttons Tool Tips and Help Tags Contextual Menus Help Menu Help Viewer Searching and Indexing Help Anchors and URLs Help Viewer Contents Installing Help Summary 15. Packaging Your Application. Packages, Bundles, and Installation Locations Installation Locations Drag-and-Drop Installation Installation Packages Creating an Application Bundle with Project Builder Creating a Disk Image Creating an Installer Package Setting Up Your Files Using a Read Me File Using a License Testing Installations Summary 16. Managing Your Code. How Source Code Management Works Setting Up CVS Create Your CVS Repository Directory Import Your Project Check Out Your Project Using Source Code Management in Project Builder File Status Version Info Comparing Files Checking Files In (Commit) Reverting CVS Preferences Logging In to a Remote CVS Server Summary Writing for Mac OS X: 17. Applications. A Walk-Through of Diary What Diary Does Diary Entries Drawers for Notes Toolbars Diary Data Structure Where To Put the Data A Walk-Through of the Diary Classes DiaryDocument DiaryData DiaryEntry Using NSApplication NSApp—The Application Object Application Delegation Application Notifications Applications in Carbon and Classic MacApp and TApplication Applications Without Frameworks Summary 18. Building Blocks and Types. Creating a Data Strategy Factoring Data and Interface Elements Fishing Data Through the Objects Implementing the Strategy Basic Types and Objects Collections Arrays Dictionaries
Sets Mutable Collections Property Lists Preferences and Defaults Default Domains Preference Names Setting Preferences Using Preferences Creating Objects Summary 19. Making It Happen: Events, Responders, Delegates and Notification. Events Types of Events Event Formats Timers Responders Working with the First Responder Selectors Sending Actions Delegates Notification Using Delegates and Notifications Receiving a Notification in a Delegate Registering for Notifications Posting a Notification Delegates versus Notifications Summary 20. Visualization (Views and Windows). Looking at Views View Hierarchies View Geometry Resizing Views Drawing Events, Mouse Handling, and Scrolling Identifying Views Adding Views Removing Views Using Windows Window Delegate Methods Window Notifications Geometry Window Controllers Creating and Loading Windows Working with Images NSImage NSImageRep Implementing Toolbars Declare Toolbar Item Names Set Default Toolbar Items Set Allowed Toolbar Items Create the Toolbar Create Toolbar Items For Response to User Clicks Drawers Summary 21. Interface Design and Controls. The Role of Guidelines and Standards User Actions Push Buttons Round Buttons Rounded Bevel Buttons Square Buttons Radio Buttons and Check Boxes Steppers User Input Text Fields Text Views Image Input Color Well Choices Providing Information to the User Displaying Text Displaying Progress Organizing Information Small Control Variants Summary 22. Living in a Shared Environment. Archiving, Serialization, and Distribution Terminology Archiving Serializing Creating Objects from Serialized Data Distribution Copying Copying Synchronism Kinds of Synchronism Opportunities for Synchronism Locking Threading Tasks Connections Summary 23. Documents and Files. Document-based Architectures Implementing Documents and Views Document Header Constructor Working with the Window Controller Saving and Restoring Data Saving Documents Restoring Data Undo and Dirty Documents Create Basic Actions Register Undo Actions Clear the Undo Stack Dirtying Documents Summary 24. Managing Menus. Menus and Other Interface Elements Contextual Menus
Dock Menus Quit Show in Finder Keep in Dock
Windows Summary 25. Printing. Basic Printing Using the Displayed View Using a Special View Print Panels Print Info PDF and Clipboard Support Summary 26. Action! Games and Multimedia. Human Interface Device (HID) Manager Create a Mach Port Find All Devices on the Port Create an Interface to a Device Open the Device Communicate Close the Device Free the Mach Port Identifying Devices NSMovie and NSMovieView NSMovie NSMovieView Immersive Applications Summary 27. Writing and Using Services. How Services Work The Basic Service Structure Other Types of Services How It Happens Business Models for Services Setting Up a Service Property List Settings Writing the Code Summary 28. Scripting in Mac OS X. AppleScript Overview Classes and Commands Scripting Functionality and Interface Uses of Scripting Making Your Application Scriptable Building the Grammar Implementing the Grammars Classes Commands Summary 29. Writing Reusable Components. Frameworks Why Use a Framework How Frameworks Run Creating a Framework Versioning the Framework Palettes The Object Itself IBPalette IBInspector Summary Index.


No. of pages:
© Morgan Kaufmann 2002
Morgan Kaufmann
eBook ISBN:

About the Author

Jesse Feiler

Jesse Feiler is Software Director of Philmont Software Mill. Co-author of Finding and Fixing Your Year 2000: A Guide for Small Businesses and Organizations with Barbara Butler, and the author of the upcoming FileMaker Pro and the World Wide Web, Jesse has also written Rhapsody Developer’s Guide, Cyberdog, and Real World Apple Guide. He has served as a consultant, author, and speaker for many prestigious businesses, including the Federal Reserve Bank of New York, Prodigy, Kodak, Young & Rubicam, and Apple Computer, Inc.

Affiliations and Expertise

Philmont Software Mill, New York, U.S.A.

Ratings and Reviews