• 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: Help with pasteboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with pasteboard


  • Subject: Re: Help with pasteboard
  • From: Brian Webster <email@hidden>
  • Date: Thu, 18 Oct 2001 14:03:10 -0500

On Thursday, October 18, 2001, at 06:06 AM, Mark's Studio wrote:

Thanks for your replay

Yes that's what i tried but it's not working

If i put more than one thing on the pasteboard in writeRows it does not work.
so i tried only declaring the types and then see what was requested

The finder only asks for
provideDataForType (
NSStringPboardType
)

if i drag and drop on my own Tableview( AddressView ) it asks for

proposedDropOperation (
NSStringPboardType,
NXFileContentsPboardType,
"NeXT plain ascii pasteboard type"
)

OK, it appears that the Finder "prefers" to take the string rather than the file if both are offered. It appears to really be an issue with the Finder, not with your code specifically. When you drop your data onto the Finder, does it correctly create a text clipping file? Have you tried only offering the file contents type? Does it create a plain text file then?

[AddressView registerForDraggedTypes:[NSArray arrayWithObjects:NSStringPboardType,@"ABVCardStringPBoardType", nil]];

Also is it enough to add an file extension to setPreferredFilename to set the type of file?

If you want to set an HFS type code, use setFileAttributes and pass in a dictionary with a key/value pair of NSFileHFSTypeCode for the key and the value an NSNumber containing a long with the 32-bit type code. You could do the same for a creator code, but this sounds like a situation where it would be preferable not to do so. You may also want to set the NSFileExtensionHidden attribute, too.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster


  • Follow-Ups:
    • Re: Help with pasteboard
      • From: Charles Srstka <email@hidden>
    • Re: Help with pasteboard
      • From: "Mark's Studio" <email@hidden>
References: 
 >Re: Help with pasteboard (From: "Mark's Studio" <email@hidden>)

  • Prev by Date: Re: NSTextView and setFont - bug or feature?
  • Next by Date: Re: Help with pasteboard
  • Previous by thread: Re: Help with pasteboard
  • Next by thread: Re: Help with pasteboard
  • Index(es):
    • Date
    • Thread