Chapter 18. Pasteboards and Nil-Targeted Actions

There is a process running on your Mac called the pasteboard server (/System/Library/CoreServices/pbs). Applications use the NSPasteboard class to write data into that process and to read data from that process. The pasteboard server makes operations like copying, cutting, and pasting between applications possible.

An application can copy the same data onto the pasteboard in several formats. For example, an image can be copied onto the pasteboard as a PDF document and as a bitmapped image. Then the application that reads the data can choose the format that it likes most.

When putting data on the pasteboard, your application typically declares the types it will put on the pasteboard and then immediately ...

Get COCOA PROGRAMMING FOR MAC OS X SECOND EDITION now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.