• 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
Files Drag&Drop - target file icon problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Files Drag&Drop - target file icon problems


  • Subject: Files Drag&Drop - target file icon problems
  • From: Alexander Bokovikov <email@hidden>
  • Date: Mon, 14 Nov 2011 13:17:22 +0600

Hi, Everyone,

In my Cocoa app, I use file saving by drag&drop into Finder window (Desktop is one particular case). I'm trying to do it just as docs tell me: I use namesOfPromisedFilesDroppedAtDestination message to create a list of files being saved (one file at least) then I create and write real files in the draggedImage:endedAt: just as docs tell me to do it.

Files are saved, but the problem is that the file icon is created at the default location but not at the mouse pointer location, when the mouse is released. I've noticed that everything goes correctly, when I save files in the namesOfPromisedFilesDroppedAtDestination message handler. But my files are large and I can't do file saving there, because target Finder window is blocked.

Now I create a zero length file (if it not exists) in the namesOfPromisedFilesDroppedAtDestination message handler then save the real file in the draggedImage:endedAt: message. The problem with icon location is resolved now, but another problem appears: Finder somehow remembers the zero-sized state of the file, so its icon is not changed into thumbnail for example for MP4 or MOV files. Standard QuickTime icon is shown instead.

Is there any really correct solution to avoid such problems?

Thanks in advance.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: RE: Troubles with Bold and Italic fonts - Cocoa
  • Next by Date: RE: Troubles with Bold and Italic fonts - Cocoa
  • Previous by thread: Re: Witch controls to use to implement an Xcode (4.2) like "toolbar view"
  • Next by thread: Variable window size based on screen resolution
  • Index(es):
    • Date
    • Thread