Instance Method


Overridden by subclasses to determine what services are available.


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



A string identifying the send type of pasteboard data. May be an empty string (see discussion).


A string identifying the return type of pasteboard data. May be an empty string (see discussion).

Return Value

If the receiver can place data of sendType on the pasteboard and receive data of returnType, it should return self; otherwise it should return either [super validRequestorForSendType:returnType:] or [[self nextResponder] validRequestorForSendType:returnType:], which allows an object higher up in the responder chain to have an opportunity to handle the message.


With each event, and for each service in the Services menu, the application object sends this message up the responder chain with the send and return type for the service being checked. This method is therefore invoked many times per event. The default implementation simply forwards this message to the next responder, ultimately returning nil.

Either sendType or returnType—but not both—may be empty. If sendType is empty, the service doesn’t require input from the application requesting the service. If returnType is empty, the service doesn’t return data.

See Also