changeset 299:4faf63f6948f

Allow null args
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 20:57:52 +0200
parents 8fa53b71485d
children acf6957f2344
files dwt/widgets/TableItem.d
diffstat 1 files changed, 1 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/widgets/TableItem.d	Sat Aug 23 13:03:13 2008 +0200
+++ b/dwt/widgets/TableItem.d	Sun Aug 24 20:57:52 2008 +0200
@@ -1050,7 +1050,6 @@
  * @param images the array of new images
  *
  * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the array of images is null</li>
  *    <li>ERROR_INVALID_ARGUMENT - if one of the images has been disposed</li>
  * </ul>
  * @exception DWTException <ul>
@@ -1060,7 +1059,6 @@
  */
 public void setImage (Image [] images) {
     checkWidget();
-    if (images is null) error (DWT.ERROR_NULL_ARGUMENT);
     for (int i=0; i<images.length; i++) {
         setImage (i, images [i]);
     }
@@ -1161,9 +1159,6 @@
  *
  * @param strings the array of new strings
  *
- * @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>
@@ -1171,7 +1166,6 @@
  */
 public void setText (String [] strings) {
     checkWidget();
-    if (strings is null) error (DWT.ERROR_NULL_ARGUMENT);
     for (int i=0; i<strings.length; i++) {
         String string = strings [i];
         if (string !is null) setText (i, string);
@@ -1184,9 +1178,6 @@
  * @param index the column index
  * @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>
@@ -1194,9 +1185,8 @@
  */
 public void setText (int index, String string) {
     checkWidget();
-    if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (index is 0) {
-        if (string ==/*eq*/text) return;
+        if (string.equals(text)) return;
         super.setText (string.dup);
     }
     int count = Math.max (1, parent.getColumnCount ());