Mercurial > projects > dwt-linux
diff dwt/dnd/DND.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 52b32f5cb1e0 |
children | ce446666f5a2 |
line wrap: on
line diff
--- a/dwt/dnd/DND.d Sat Apr 26 10:01:30 2008 +0200 +++ b/dwt/dnd/DND.d Mon May 05 00:42:55 2008 +0200 @@ -12,6 +12,8 @@ *******************************************************************************/ module dwt.dnd.DND; +import dwt.dwthelper.utils; + import dwt.DWT; import dwt.DWTError; @@ -200,10 +202,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 +245,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: