Re: HFSPromised, other file systems, and what is the deal?
Re: HFSPromised, other file systems, and what is the deal?
- Subject: Re: HFSPromised, other file systems, and what is the deal?
- From: Buzz Andersen <email@hidden>
- Date: Thu, 16 Jan 2003 13:02:01 -0700
>
How is this different or better than just having the user use the Save
>
Panel?
Because sometimes it is more convenient for a user to simply drag to a
destination, rather than navigating there through a panel.
>
How is this different from dragging a folder from Finder to the Save
>
Panel in order to tell the Save Panel where files should be saved?
Wow--that's pretty cool! I didn't even know you could do that :-).
Again though, I believe the answer comes down to
intuition--metaphorically, it makes sense to people that they can drag
an iconic representation of their data to the location where they want
it stored.
>
Why does a "promise" have to be made?
When you release a drop, the drag destination needs to go to work on
whatever data you're giving it. In the case of file copying, you can
put a filename on the pasteboard and release a drop on your desktop,
and the Finder will know that it should begin a copy. In the case of
promised drags, you want to provide data that you will be creating on
the fly (not something that previously exists, as in the case of the
aforementioned copy), but you need to do it through a mechanism (the
pasteboard) that normally only provides data that already exists. So
what you do is give the Finder a "promise," which is basically a token
on the pasteboard that tells it "When you are ready, I will create some
data in the drop location."
Once the Finder has this token, it knows it should call your app's
"namesOfPromisedFilesDroppedAtDestination:" method with the location of
the drop. It is then your app's responsibility to create the necessary
files and return the names of the files created so the Finder can know
what happened.
>
Why not just synthesize the file paths via some other communications
>
channel besides drag and drop?
Not sure I understand this question...
>
The documentation talks about HFS promises; does that mean similar
>
promises can not be made for UFS or NFS or AFS or WebDav file systems > ?
No--the Finder abstracts the differences between the file systems. I
have a Cocoa app that uses promises, and it works correctly with my
iDisk (WebDAV) as well as the shares on my Windows PC at work.
Hope this answers your questions somewhat. I would be the first to
tell you that promised drags, as implemented in Cocoa, are awkward and
buggy (I have a known issue with my app that is related to a Finder bug
with both Carbon and Cocoa promised drags). However, the facility they
provide is important (I couldn't have made my application work the way
it does without them!).
--
Buzz Andersen
email: email@hidden
web:
http://www.scifihifi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.