# HG changeset patch # User Jacob Carlborg # Date 1230729420 -3600 # Node ID e655f9f353426edc7eae032f8e3cd68c2538d798 # Parent 1c12673c65cac5e3e633b201ff2d329c1486e500 Ported dwt.dnd.ByteArrayTransfer diff -r 1c12673c65ca -r e655f9f35342 dwt/dnd/FileTransfer.d --- a/dwt/dnd/FileTransfer.d Wed Dec 31 13:24:24 2008 +0100 +++ b/dwt/dnd/FileTransfer.d Wed Dec 31 14:17:00 2008 +0100 @@ -8,6 +8,9 @@ * Contributors: * IBM Corporation - initial API and implementation * Outhink - support for typeFileURL + * + * Port to the D programming language: + * Jacob Carlborg *******************************************************************************/ module dwt.dnd.FileTransfer; @@ -17,6 +20,8 @@ import dwt.internal.cocoa.NSMutableArray; import dwt.internal.cocoa.NSString; import dwt.internal.cocoa.OS; + +import dwt.dnd.TransferData; /** * The class FileTransfer provides a platform specific mechanism @@ -38,13 +43,19 @@ * * @see Transfer */ -public class FileTransfer extends ByteArrayTransfer { +public class FileTransfer : ByteArrayTransfer { + + static FileTransfer _instance; + static const String ID_NAME = OS.NSFilenamesPboardType.getString(); + static const int ID; - static FileTransfer _instance = new FileTransfer(); - static final String ID_NAME = OS.NSFilenamesPboardType.getString(); - static final int ID = registerType(ID_NAME); + static this () + { + _instance = new FileTransfer(); + ID = registerType(ID_NAME); + } -FileTransfer() {} +this() {} /** * Returns the singleton instance of the FileTransfer class.