Re: Help with pasteboard
Re: Help with pasteboard
- Subject: Re: Help with pasteboard
- From: Charles Srstka <email@hidden>
- Date: Thu, 18 Oct 2001 23:17:43 -0500
On Thursday, October 18, 2001, at 07:32 PM, Brian Webster wrote:
On Thursday, October 18, 2001, at 06:59 PM, Charles Srstka wrote:
2. NSTemporaryDirectory() won't work (at least it didn't in 10.0.4),
because the Finder won't move the file, claiming it can't be found,
because /tmp is an invisible directory.
Well that certainly is gimpy.
So, I'd really like another option. NSFileWrapper looks good, but what
I'd like even more is to know the path that I dragged the file to.
Unfortunately, it seems I can't use either. Great...
Well, NSFileWrapper is supposed to make the operation transparent, so
that it doesn't matter where it's getting moved, or so that a file can
be moved to somewhere other than the file system (e.g. a remote
server). The real solution is for Apple to fix this ASAP. Time to
fire up the bug reporter/feedback e-mail addresses....
I realize this. However, I would like to have the path I dragged it to
so I could just handle all this myself. Even if Apple gets NSFileWrapper
working, there's another problem that will affect both
NSFilenamesPboardType and NSFileWrapper, which is...
4. In 10.0.4, the dragging process worked like this: The user started a
drag, the system called -outlineView; writeItems: toPasteboard:, the
user dragged an item to a Finder window, the user let go of the mouse
button, the system called -pasteboard: provideDataForType:, and the file
got moved. In 10.1, however, the system doesn't wait for the user to let
go of the mouse before calling -pasteboard: provideDataForType:.
Instead, it calls that method as soon as the user hovers the mouse over
a Finder window, before they let go of it. So I end up creating a file
(which may be huge) even when I am not yet sure the user will not change
his/her mind. To make things worse, my progress bar, which used to be in
a document-modal sheet, now has to be in a separate window, because when
a sheet tries to make itself modal for a document window that currently
is in the middle of a drag, it balls everything up bad enough that I
have to force-quit both my app and the Finder. Argh! I also can't thread
this operation, since all the methods seem to get called by the system,
resulting in the creation of one file tying up my entire program until
it finishes.
Someone please tell me how I can just get the dragging destination and
put the file there myself. Then I can give that path to the Finder, and
it can put it in whatever spatial location it wants to. This would be so
much simpler!
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev