Instance Method

validRequestorForSendType:returnType:

Indicates whether the receiver can send and receive the specified pasteboard types.

Declaration

- (id)validRequestorForSendType:(NSPasteboardType)sendType returnType:(NSPasteboardType)returnType;

Parameters

sendType

The pasteboard type the app needs to send.

returnType

The pasteboard type the app needs to receive.

Return Value

The object that can send and receive the specified types or nil if the receiver knows of no object that can send and receive data of that type.

Discussion

This message is sent to all responders in a responder chain. NSApp is typically the last item in the responder chain, so it usually receives this message only if none of the current responders can send sendType data and accept back returnType data.

The receiver passes this message on to its delegate if the delegate can respond (and isn’t an NSResponder object with its own next responder). If the delegate can’t respond or returns nil, this method returns nil. If the delegate can find an object that can send sendType data and accept back returnType data, it returns that object.

See Also

Providing Services

servicesProvider

The object that provides the services the current app advertises in the Services menu of other apps.