Re: Drag and Drop a File... help!!
Re: Drag and Drop a File... help!!
- Subject: Re: Drag and Drop a File... help!!
- From: "Stephen C. Jensen" <email@hidden>
- Date: Tue, 10 Dec 2002 21:25:03 -0600
Any other thoughts on this? Anyone know of a sample application which
supports drag and drop to a file in the finder (something other than
a picture of text clipping?) I am sure there is a simple way to do
this... I just need to know which methods I need to implement (beyond
that which provides a standard text clipping) and which PboardTypes
to use. Help?
At 12:15 -0800 12/7/02, Vince DeMarco wrote:
On Saturday, December 7, 2002, at 11:54 AM, Stephen Jensen wrote:
I've tried NSVCardPboardType... I think I implemented it correctly,
but Address Book, Finder, and Palm just took the text version. I
also looked at the Promised Files of Types... I came to the same
conclusion that Buzz did. Any other ideas?
There was a bug in the old version of Address Book, we generated
NSVCardPboardType but didn't accept it (sorry).
vince
On Saturday, December 7, 2002, at 11:12 AM, Buzz Andersen wrote:
See the section "HFS Promises" in the 10.2 AppKit release notes
The somewhat strange way (IMHO) in which promised drags have been
implemented in Cocoa might cause a conflict with his desire to
preserve the ability to drag into Palm Desktop, Address Book, and
other vCard savvy apps. Specifically, one has to use NSView's
dragPromisedFilesOfTypes:fromRect:source:slideBack:event: method,
which, at least as far as I can tell, doesn't give you the
opportunity to specify any other representations of the data on
the pasteboard (this has been discussed on the list before). So,
unless the other programs can handle HFS promises, you're out of
luck. Am I wrong about this?
Also, another contraindication to the use of promised drags (at
least at present) is that the Finder has an annoying bug that can
come into play with 10.2's spring-loaded folder feature. If you
drop a promised file on a Finder folder and mistime it so that you
release the drop right before the folder springs open, all of the
sudden the Finder becomes confused and the icons in the parent
folder stop highlighting. This isn't *that* bad, I suppose,
unless the parent folder happens to be the Desktop, in which case
your only option for getting things back to normal is to restart
the Finder. I know all of this because I am working on an
application that uses promised drags, and I have already dealt
with Apple Developer Tech Support on this very issue (they
confirmed that it is simply a Finder bug that affects both Carbon
and Cocoa apps).
What I would personally look into is the new "NSVCardPboardType"
data type added to NSPasteboard in 10.2 (see the documentation on
NSPasteboard). I've never tried using it, but I think it might do
the trick...
--
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.
_______________________________________________
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.
_______________________________________________
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.
--
Stephen C. Jensen
X-37 DFRC Chief Engineer
Flight Systems Engineering Branch/Code RF
Dryden Flight Research Center
(661) 276-3841
<
mailto:email@hidden>
_______________________________________________
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.