Mercurial > projects > dwt-win
changeset 240:c84e3d3feb3f
allow null strings and arrays as arguments
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 21 Jun 2008 02:24:49 +0200 |
parents | 43b41c7fe84a |
children | b4846fd3437a |
files | dwt/widgets/MenuItem.d dwt/widgets/TabFolder.d dwt/widgets/TabItem.d |
diffstat | 3 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/widgets/MenuItem.d Fri Jun 20 16:27:36 2008 +0200 +++ b/dwt/widgets/MenuItem.d Sat Jun 21 02:24:49 2008 +0200 @@ -1032,9 +1032,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> @@ -1044,7 +1041,8 @@ */ override 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); if ((style & DWT.SEPARATOR) !is 0) return; if (text==/*eq*/string ) return; super.setText (string);
--- a/dwt/widgets/TabFolder.d Fri Jun 20 16:27:36 2008 +0200 +++ b/dwt/widgets/TabFolder.d Sat Jun 21 02:24:49 2008 +0200 @@ -668,9 +668,6 @@ * * @param items the array of items * - * @exception IllegalArgumentException <ul> - * <li>ERROR_NULL_ARGUMENT - if the items array 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> @@ -678,7 +675,8 @@ */ public void setSelection (TabItem [] items) { checkWidget (); - if (items is null) error (DWT.ERROR_NULL_ARGUMENT); + // DWT extension: allow null array + //if (items is null) error (DWT.ERROR_NULL_ARGUMENT); if (items.length is 0) { setSelection (-1, false); } else {
--- a/dwt/widgets/TabItem.d Fri Jun 20 16:27:36 2008 +0200 +++ b/dwt/widgets/TabItem.d Sat Jun 21 02:24:49 2008 +0200 @@ -325,9 +325,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> @@ -336,7 +333,8 @@ */ override 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); if (string ==/*eq*/text ) return; int index = parent.indexOf (this); if (index is -1) return;