Appendix A. Cocoa Resources

Although you now know enough to write a Cocoa application, the truth of the matter is that we have only scratched the surface of what there is to learn. There are dozens of classes that we haven’t explained. There are frameworks that we’ve only hinted at. There’s a lot of functionality that we didn’t include because, frankly, it still has bugs. And finally, there’s the fact that Cocoa is still a work-in-progress, with Apple sure to make more changes.

So, now that we’ve reached the end of this little course in learning Cocoa, what we hope to leave you with is instructions for finding out more. Fortunately, there are many, many Cocoa references online. We’ve tried to assemble a list of some here. You’ll find still more on the Web. The references included here were accurate as of the time this book went to press, but some may have changed by the time you read the book.

For additional information about the material presented in this book, we recommend that you first check this book’s own web site, located at:

http://www.oreilly.com/catalog/buildcocoa/

At this site, you’ll find the book’s sample code available for download, errata, and other book-related information, such as plans for future editions.

Apple Resources

Over the years Apple has made a significant effort to make the Macintosh a friendly platform for developers and users alike. With Mac OS X, Apple has redoubled its efforts. A staggering amount of technical information for the Mac OS X platform is available online. Much of this information you can access without registering or paying a penny.

Online Documentation

The most important reference available for developing Cocoa applications is Apple’s own documentation. This documentation describes every Cocoa class, method, and function is great detail. Apple has also created higher-level “concepts” documentation that discusses many higher-level issues in Cocoa programming, from memory allocation and drawing to advanced interprocess communications issues.

When you install the developer tools from the Mac OS X Developer Tools CD-ROM, you are given an option to install the developer documentation on your computer. The documentation installs as both a series of HTML files and a PDF file of the entire manual. The HTML files can be viewed from within Project Builder itself by choosing Cocoa Help from the Project Builder Help menu. If you wish, you can print the PDF files to create your own bound copy of the documentation.

As an alternative to reading the Apple documentation on your computer, we recommend reading it from Apple’s web site. The documentation on the web site is the most up-to-date, and it frequently has more detailed explanations and discussions than you will find on the Developer CD-ROM. An added advantage of the online documentation is that it is easily searchable.

You will find Apple’s online documentation at:

http://developer.apple.com/techpubs/

Apple also makes much of its developer documentation available in hardcopy form. On the technical publications web site, you will find information about how to order hardcopy documentation.

In writing this book, we found the following Apple technical publications to be extremely useful:

Mac OS X Developer Documentation

http://developer.apple.com/techpubs/macosx/macosx.html

This is the primary entry point for documentation about developing software for the Mac OS X environment. This documentation area is divided into the following categories: Essentials; Carbon; Cocoa; Developer Tools; Core Technologies; Additional Technologies; Networking; Release Notes; Legacy; and Darwin.

Cocoa Developer Documentation

http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html

This is the primary entry point for documentation about developing software using Cocoa. This documentation area is divided into the following categories: Site Information; Getting Started; Java Framework Reference; Objective-C Framework Reference; Legacy; Program Design; Data Management; File, Resource, and Process Management; Events and Other Input; Drawing and Imaging; Text Handling; User Interface Elements; Interapplication Communication; and Multimedia.

Introduction to the Aqua Human Interface Guidelines

http://developer.apple.com/techpubs/macosx/Essentials/AquaHIGuidelines/index.html

This book describes how to design your application for the Aqua user interface. The information in this book will allow you to make your application operate in a manner that is consistent with other Aqua applications, which ultimately makes it easier for people to use your application without additional training. If you are going to be developing applications that will be used by a large group of people, we recommend that you read this book.

Foundation Objective-C API Reference

http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_classic/FoundationTOC.html

Application Kit Objective-C API Reference

http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/AppKitTOC.html

These pages list all of the Objective-C classes and informal protocols that make up the Cocoa Foundation and Application Kit, respectively. In writing this book, we found that the fastest way to look up the documentation for a particular class was to go to these pages and then select the class name. If you are a serious Cocoa programmer, we strongly recommend that you bookmark these pages.

Apple Developer Connection

The Apple Developer Connection (ADC) is Apple’s primary tool for communicating with Macintosh developers. Registered developers receive regular bulletins by email, access to Apple’s developer resources, and more.

Basic membership for the ADC is free. This free membership allows you to download the latest development tools, file bug reports, gain access to certain early software releases, and receive weekly technical updates via email.

If you’d rather have this type of information mailed to you, you can pay to become an ADC Mailing customer. You will then receive the latest in development tools, system software, development kits, and reference materials via a CD-ROM series delivered to you monthly via postal mail.

A low-cost ADC Student Program is aimed at university students around the world. ADC Student developers receive special introductory tools, access to a student community of Mac programmers, and other educational opportunities, including the chance to win scholarships to the Worldwide Developers Conference.

For more money, you can sign up for the Select and Premier levels of service. These programs offer a multitude of high-end products and services, including discounts on Apple hardware and third-party products and services and access to Apple’s technical support engineers.

You will find information about the Apple Developer Connection at:

http://developer.apple.com

Information about signing up for these programs can be found at:

http://developer.apple.com/membership/

Sample Code

We believe that the best way to learn to program a new environment is through a combination of writing your own source code and reading well-written code that others have developed. That’s why we have presented a combination of source code and exercises in this volume.

If you’re looking for more programming examples, you need look no further than your own hard drive: the Cocoa Developer Tools come with source code for a large number of sample programs. You’ll find these programs in the /Developer/Examples/AppKit and /Developer/Examples/Carbon directories. Of particular interest are the following:

/Developer/Examples/AppKit/CircleView

CircleView is a simple application that demonstrates NSView subclassing and text display.

/Developer/Examples/AppKit/CompositeLab

There are 13 distinct compositing operations. This application allows you to use each of those operations with a source and destination of your choice. This is a great lab for showing you how the compositing system works and how to incorporate image-manipulation functionality into your application.

/Developer/Examples/AppKit/DragNDropOutlineView

This demonstration shows you how to construct an outline view and enable drag-and-drop. The application also allows you to experiment with the many different options to consider when you enable drag-and-drop in an outline view.

/Developer/Examples/AppKit/Rulers

A ruler is a view that tracks along with the content view of a scroll view. You are probably familiar with rulers from the word-processor application, but here you can actually create your own rulers and use them for a variety of purposes.

/Developer/Examples/AppKit/SimpleImageFilter

The Cocoa image filter system allows you to give existing Cocoa applications the ability to read nonstandard graphics file formats. Although we did not discuss image filters in this book, they are similar in practice to services. This code shows you how to implement them.

/Developer/Examples/AppKit/SimpleToolbar

Many Cocoa applications have toolbars. This source code shows you how to add toolbars to your own applications. Try Control-clicking on the toolbar to customize it.

/Developer/Examples/AppKit/Sketch

Sketch is a full-blown drawing application that implements a ton of functionality. If you want to respond to events, draw text, print, implement services, or do practically anything with graphics, you should check out Sketch.

/Developer/Examples/AppKit/TextEdit

This is the source code for the TextEdit application. It’s a good place for information-building applications that use the multiple-document architecture.

Worldwide Developers Conference

The Apple Worldwide Developers Conference (WWDC) is an annual meeting of Macintosh developers, hosted by Apple Computer. The conference features tutorials, classes, introductions to the latest Apple technologies, and a show floor with the latest and greatest tools for Macintosh developers. You should be there! Check out:

http://developer.apple.com/wwdc/

Registering Creator Codes

The future of creator codes is presently in doubt. Nevertheless, when you start developing a commercial application of your own, you should register a unique creator code with Apple at this web site:

http://developer.apple.com/dev/cftype/

Bug Reporting

If you find a bug in Cocoa or any other part of the Macintosh environment, you are encouraged to report it at:

http://bugreporter.apple.com

Apple also welcomes any feedback that you might have regarding Cocoa. You can send your comments to .

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.226.79