• 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
Pasteboards and filenames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pasteboards and filenames


  • Subject: Pasteboards and filenames
  • From: Sam Goldman <email@hidden>
  • Date: Sun, 02 Jun 2002 17:10:19 -0700

OK, so I have drag and drop working the way it should be working and I have
solved a few other problems on the way, but now there is this one I am
having with pasteboards and arrays.

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]

What I want to do is check to see whether the filename is a directory of a
regular file. Since there is the possibility of having multiple files, it
makes some amount of sense that the string comes out like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM
"file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<array>
<string>/Users/sgoldman/Desktop/Happy Happy Joy Joy.mp3</string>
</array>
</plist>

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...

- Sam
_______________________________________________
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.

  • Follow-Ups:
    • Re: Pasteboards and filenames
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Hunting for System Preferences
  • Next by Date: Re: DeveloperTools and simple question
  • Previous by thread: Re: Hunting for System Preferences
  • Next by thread: Re: Pasteboards and filenames
  • Index(es):
    • Date
    • Thread