• 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: Drag to Finder and create a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag to Finder and create a file


  • Subject: Re: Drag to Finder and create a file
  • From: Serge Meynard <email@hidden>
  • Date: Mon, 11 Apr 2005 13:27:07 -0400

On Apr 11, 2005, at 12:43, Lorenzo wrote:
Yes I have already seen those 2 "little" articles in the FAQ section.
1. How Do I Set a Custom Drag Image When Doing an HFS Promise Drag in
Cocoa?
2. How Do I Add Other Pasteboard Types to an HFS Promise Drag in Cocoa?

But they say almost nothing. And it's not what I need to know because my
pasteboard has already the NSFilesPromisePboardType. I do that here:

In your previous mail, you said:

Also, when I drag an item from the outlineView, if the destination is the
outlineView itself, I don't have to create a file. I have just to move the
item within the outline view. BUT, since I call dragPromisedFilesOfTypes:
(see here above) to let the user drag the item to the Finder too, now every
time I start a drag I see a white file icon and I cannot drag the item
within the outline view anymore. I can only drag it to the Finder.

If I understood the second point ("...Other Pasteboard Types...") correctly, this trick lets you add another type of pasteboard data even after you've started a file drag. Wouldn't that allow you to have a pasteboard with both a promised file (for the Finder) and an internal data type (for your own views)?
Also, using the first trick, you can override the "white file" and use whatever image you were using for internal drags.


The doc for that method says "The source may or may not have created
the files by the time this method returns." So I assume there *is* a
way to create them elsewhere/later, but I've never used promised drags
so I'm not sure.

But, who should create the file? Me by myself as I have shown in the
namesOfPromisedFilesDroppedAtDestination call? Or the Finder automatically
because I pass it the proper flavour? This is not explained anywhere.

Based on what I can find in the archives (such as http://www.cocoabuilder.com/archive/message/2003/1/16/87429), it looks like namesOfPromisedFilesDroppedAtDestination: literally means "you promised me some files, now create them at the destination (drop location) I just provided and tell me their names". So I would guess that yes, you're pretty much supposed to create them inside that method.


_______________________________________________
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


References: 
 >Re: Drag to Finder and create a file (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Re: Drag to Finder and create a file
  • Next by Date: WWDC2k5 and ROI
  • Previous by thread: Re: Drag to Finder and create a file
  • Next by thread: Stacking NSSplitViews
  • Index(es):
    • Date
    • Thread