O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSServicesRequests — Mac OS X 10.0

Synopsis

This informal protocol declares the two methods writeSelectionToPasteboard:types: and readSelectionFromPasteboard:, which classes may implement to interact with system services found in the Services menu. The first of these, writeSelectionToPasteboard:types:, is used to provide data to a service, while readSelectionFromPasteboard: is used to retrieve data from a service.

@interface NSObject (NSServicesRequests)
                                  // Instance Methods
   - (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard 
                                 types:(NSArray *)types;
   - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard;
@end

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required