diff dwt/dnd/DND.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 242e33c0e383
children 36f5cb12e1a2
line wrap: on
line diff
--- a/dwt/dnd/DND.d	Sat Apr 26 10:01:48 2008 +0200
+++ b/dwt/dnd/DND.d	Mon May 05 00:12:38 2008 +0200
@@ -18,6 +18,7 @@
 import dwt.DWTException;
 
 import tango.util.Convert;
+import dwt.dwthelper.utils;
 
 /**
  *
@@ -200,10 +201,10 @@
     public static const int ERROR_INVALID_DATA = 2003;
 
 
-    static const char[] INIT_DRAG_MESSAGE = "Cannot initialize Drag"; //$NON-NLS-1$
-    static const char[] INIT_DROP_MESSAGE = "Cannot initialize Drop"; //$NON-NLS-1$
-    static const char[] CANNOT_SET_CLIPBOARD_MESSAGE = "Cannot set data in clipboard"; //$NON-NLS-1$
-    static const char[] INVALID_DATA_MESSAGE = "Data does not have correct format for type"; //$NON-NLS-1$
+    static const String INIT_DRAG_MESSAGE = "Cannot initialize Drag"; //$NON-NLS-1$
+    static const String INIT_DROP_MESSAGE = "Cannot initialize Drop"; //$NON-NLS-1$
+    static const String CANNOT_SET_CLIPBOARD_MESSAGE = "Cannot set data in clipboard"; //$NON-NLS-1$
+    static const String INVALID_DATA_MESSAGE = "Data does not have correct format for type"; //$NON-NLS-1$
 
 /**
  * Throws an appropriate exception based on the passed in error code.
@@ -243,23 +244,23 @@
     switch (code) {
         /* OS Failure/Limit (fatal, may occur only on some platforms) */
         case DND.ERROR_CANNOT_INIT_DRAG:{
-            char[] msg = DND.INIT_DRAG_MESSAGE;
-            if (hresult !is 0) msg ~= " result = "~to!(char[])(hresult); //$NON-NLS-1$
+            String msg = DND.INIT_DRAG_MESSAGE;
+            if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$
             throw new DWTError (code, msg);
         }
         case DND.ERROR_CANNOT_INIT_DROP:{
-            char[] msg = DND.INIT_DROP_MESSAGE;
-            if (hresult !is 0) msg ~= " result = "~to!(char[])(hresult); //$NON-NLS-1$
+            String msg = DND.INIT_DROP_MESSAGE;
+            if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$
             throw new DWTError (code, msg);
         }
         case DND.ERROR_CANNOT_SET_CLIPBOARD:{
-            char[] msg = DND.CANNOT_SET_CLIPBOARD_MESSAGE;
-            if (hresult !is 0) msg ~= " result = "~to!(char[])(hresult); //$NON-NLS-1$
+            String msg = DND.CANNOT_SET_CLIPBOARD_MESSAGE;
+            if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$
             throw new DWTError (code, msg);
         }
         case DND.ERROR_INVALID_DATA:{
-            char[] msg = DND.INVALID_DATA_MESSAGE;
-            if (hresult !is 0) msg ~= " result = "~to!(char[])(hresult); //$NON-NLS-1$
+            String msg = DND.INVALID_DATA_MESSAGE;
+            if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$
             throw new DWTException (code, msg);
         }
         default: