[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Dropping Java objects as text

Duong Nguyen wrote:

> "MyInternalTransfer" will only be
> requested if the target is your own application since no other app knows
> about it. 

Is this true?  I haven't created a new TransferData subclass.  As far as I
know, MyInternalTransfer could be chosen whenever the drop target requests
a transfer type that uses a byte array as its "native" form.  The way I
understand it is that the drag source's MyInternalTransfer instance dragT
offers up a TransferData instance td, and if the drop target mentions a
Transfer instance dropT for which dropT.isSupportedType(td) returns true,
then the drag-and-drop framework will use dragT.javaToNative and
dropT.nativeToJava.  This can happen even when dragT and dropT are
instances of different classes, or when dropT is native code in a
different, non-Eclipse application.  That's why I'm worried about the
circumstances under which isSupportedType might return true for different
types.  It makes sense that byte arrays and strings might be considered
compatible for DND purposes under some platforms.

-David