Copyright ©1995 by NeXT Computer, Inc. All Rights Reserved.
NXServicesRequests (informal protocol) |
Category Of: | Object | |
Declared In: | appkit/Application.h |
Category Description |
This informal protocol consists of two methods, writeSelectionToPasteboard:types: and readSelectionFromPasteboard:. The first is implemented to provide data to a remote service, and the second to receive any data the remote service might send back. Both respond to messages that are generated when the user chooses a command from the Services menu. |
Instance Methods |
readSelectionFromPasteboard: |
readSelectionFromPasteboard:pboard |
Implemented to replace the current selection with data read from the Pasteboard object pboard. The data would have been placed in the pasteboard by another application in response to a remote message from the Services menu. A readSelectionFromPasteboard: message is sent to the same object that previously received a writeSelectionToPasteboard:types: message.
There's no default readSelectionFromPasteboard: method. The Application Kit declares a prototype for this method, but doesn't implement it. See also: writeSelectionToPasteboard:types: |
writeSelectionToPasteboard:types: |
(BOOL)writeSelectionToPasteboard:pboard types:(NXAtom *)types |
Implemented to write the current selection to the Pasteboard object pboard. The selection should be written as one or more of the data types listed in types. After writing the data, this method should return YES. If for any reason it can't write the data, it should return NO.
A writeSelectionToPasteboard:types: message is sent to the first responder when the user chooses a command from the Services menu, but only if the receiver didn't return nil to a previous validRequestorForSendType:andReturnType: message. After this method writes the data to the pasteboard, a remote message is sent to the application that provides the service the user requested. If the service provider supplies return data to replace the selection, the first responder will then receive a readSelectionFromPasteboard: message. There's no default writeSelectionToPasteboard:types: method. The Application Kit declares a prototype for this method, but doesn't implement it. See also: validRequestorForSendType:andReturnType: (Responder class), readSelectionFromPasteboard: |