Re: Pasteboards and filenames
Re: Pasteboards and filenames
- Subject: Re: Pasteboards and filenames
- From: Shawn Erickson <email@hidden>
- Date: Sun, 2 Jun 2002 19:40:46 -0700
On Sunday, June 2, 2002, at 05:10 PM, Sam Goldman wrote:
The table view is set up to accept NSFilenamesPBoardType only.
In the method: -
tableView:validateDrop:proposedRow:proposedDropOperation:,
I get the NSDraggingInfo and then get the pasteboard from that with this
code: [[info draggingPasteboard] stringForType:NSFilenamesPboardType]
[snip]
I don't mind working with this, but I don't see any way of getting the
data
into an array without first writing it to a file and then reading it
back
in. There has to be a better way...
Did you try propertyListForType: instead of stringForType?
I think the following is what you want...
NSArray *files;
files = [[info draggingPasteboard]
propertyListForType:NSFilenamesPboardType];
see:
<
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
DragandDrop/index.html>
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.