Files Drag&Drop - target file icon problems
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