Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Outgoing drag & drop



From comments made by Vladimir Lhotak and the Javadoc for com.apple.mrj.datatransfer.FileTransferable it seems that both single files and multiple files are transferred to and from native apps in a transferable with type OSTypeFlavor.kTypeHFS, where in the case of multiple files the transfer data is itself an array of Transferables.

For incoming drags this array is translated to a transferable with flavor DataFlavor.javaFileListFlavor (ie. a java.util.List of java.io.File objects), as expected by Java.

However, the converse translation does not seem to be applied for outgoing drags. Instead, a transferable consisting of a single serialized File (with flavor TranslationUtils.kTypeJavaFile) is translated to kTypeHFS, but there doesn't seem to be any way to transfer a list of files.

Why doesn't the outgoing drag do the converse translation, is this just an oversight or is there some fundamental reason why I can't drag more than one file from Java? Could I create a transferable of type kTypeHFS (containing a nested array of transferables) myself to do this? And who or what is the Kucing paradigm??

-Rolf
--
Rolf Howarth, Square Box Systems Ltd, Stratford-upon-Avon UK.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.