Reputation: 5076
At the moment I'm using readObjectsForClasses: to retrieve a list of objects from the general pasteboard in cocoa, which works whenever I want to only retrieve objects of a certain class e.g. NSString or NSImage etc.
However, I would like to be able to read every single object in it without having to make an array of all of their classes, such that the array returned would contain every single item in the pasteboard.
Is this possible?
Upvotes: 2
Views: 384
Reputation: 8170
Have you tried using the types
method of the NSPasteboard
object? I haven't tried it but the documentation says:
Return Value
An array of NSString objects containing the union of the types of data declared for all the pasteboard items on the receiver. The returned types are listed in the order they were declared.
With this method you can probably query the pasteboard types, even if you won't be able to read them.
Upvotes: 2