Reading from the draggingPasteboard
Reading from the draggingPasteboard
- Subject: Reading from the draggingPasteboard
- From: Stefan Reindl <email@hidden>
- Date: Thu, 24 Mar 2005 14:52:28 +0100
Hi everyone,
I canĀ“t figure out how to read a string from the draggingPasteboard. I
implemented a subclass of NSImageView and made it the dragging
destination. So far, everything works just fine, I drag a file on it
and the NSLog output gives me the path of the file.
Now I want to read out the pasteboard content in a subclass of NSWindow
but the following code gives me a warning (NSPasteboard may not respond
to +draggingPasteboard).
How can I get the filepath from the pasteboard?
- (IBAction) copyFileIntoBundle:(id)sender {
NSPasteboard *pboard = [NSPasteboard draggingPasteboard];
NSArray *filenames = [pboard propertyListForType:NSFilenamesPboardType];
NSLog(@"performDragOperation: filenames: %@", [filenames description]);
[...]
}
TIA
Stefan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden