• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pasteboards and filenames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Pasteboards and filenames (From: Sam Goldman <email@hidden>)

  • Prev by Date: bad day...stupid me
  • Next by Date: Re: stupid OS or am I stupid?
  • Previous by thread: Pasteboards and filenames
  • Next by thread: Re: cocoa-dev digest, Vol 2 #729 - 17 msgs
  • Index(es):
    • Date
    • Thread