Mercurial > projects > dwt-win
diff dwt/widgets/Decorations.d @ 239:43b41c7fe84a
work on allow null strings and arrays
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 20 Jun 2008 16:27:36 +0200 |
parents | 36f5cb12e1a2 |
children | fd9c62a2998e |
line wrap: on
line diff
--- a/dwt/widgets/Decorations.d Fri Jun 20 01:29:54 2008 +0200 +++ b/dwt/widgets/Decorations.d Fri Jun 20 16:27:36 2008 +0200 @@ -1060,7 +1060,6 @@ * @param images the new image array * * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the array of images is null</li> * <li>ERROR_INVALID_ARGUMENT - if one of the images is null or has been disposed</li> * </ul> * @exception DWTException <ul> @@ -1072,7 +1071,8 @@ */ public void setImages (Image [] images) { checkWidget (); - if (images is null) error (DWT.ERROR_INVALID_ARGUMENT); + // DWT extension: allow null array + //if (images is null) error (DWT.ERROR_INVALID_ARGUMENT); for (int i = 0; i < images.length; i++) { if (images [i] is null || images [i].isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); } @@ -1328,9 +1328,6 @@ * * @param string the new text * - * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the text is null</li> - * </ul> * @exception DWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1338,7 +1335,8 @@ */ public void setText (String string) { checkWidget (); - if (string is null) error (DWT.ERROR_NULL_ARGUMENT); + // DWT extension: allow null string + //if (string is null) error (DWT.ERROR_NULL_ARGUMENT); /* Use the character encoding for the default locale */ TCHAR[] buffer = StrToTCHARs (string, true); /* Ensure that the title appears in the task bar.*/