If you want to get up to speed quickly on using Carbon to create Mac OS X applications, this is the book for you. It shows how to put together a Carbon application that does all the things commonly found in an application, such as handling windows, responding to menu commands and controls in the interface, printing documents, and opening and saving files. The application you’ll create in this book isn’t one of those boring computational programs that figure prime numbers or compute factorials. Instead, you’ll put together something that could be of practical value as we enter the third millennium—a moon travel planner.
This book is not an exhaustive guide to writing Carbon applications. We’ve limited the topics and scope of coverage to those we think are most important for programmers new to Carbon. We’ve provided a road map to all the Carbon managers and services (Chapter 1) and an introduction to a few advanced topics—scripting, tab controls, threads, and multiprocessing (Chapter 14). So once you are finished with this book, you’ll be prepared to write a Carbon application on your own.
If you’re writing an application that will run exclusively on Mac OS X, there are several ways you can do it. You can use Cocoa, Carbon, or Java. So why use Carbon? If you know a procedural language, such as C, you’ll feel right at home with Carbon. You’ll be able to draw upon your knowledge and experience of procedural programming languages. You might even find that in new applications you create with Carbon, you can reuse code you’ve already written.
Although the Carbon programming interface uses the C language, you can write Carbon applications in many different languages, including object oriented languages such as C++. Apple provides both C and C++ compilers for use with Carbon, and third-party tools are available for writing Carbon applications in Pascal, BASIC, Fortran, and other languages.
If you are more familiar with object-oriented programming, you should take a look at Learning Cocoa (O’Reilly & Associates). Java programmers may want to read Inside Mac OS X: Java Development for Mac OS X, available from Apple’s Java Developer Documentation web site: