16. Snippets

“Just one line of code; the hard part is figuring out which one.”

—Mike Trent

This chapter is designed to offer a plethora of code snippets and tips in various forms to help you get the most out of your Mac OS X development efforts. You will find various languages represented here. Many of these snippets are demonstrated in the Project Builder project that goes with this chapter. Enjoy!

Calling Carbon from Cocoa

It is very easy to call traditional Carbon functionality from within your Cocoa application. Simply include the framework Carbon.framework in your project, #import <Carbon/Carbon.h> in the source file you will be calling from, and make the call. Cocoa and Carbon live peacefully together with nary a bad thought for one another. ...

Get Mac OS® X Advanced Development Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.