diff dwt/widgets/CoolBar.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/CoolBar.d	Fri Jun 20 01:29:54 2008 +0200
+++ b/dwt/widgets/CoolBar.d	Fri Jun 20 16:27:36 2008 +0200
@@ -815,7 +815,6 @@
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if item order or sizes is null</li>
  *    <li>ERROR_INVALID_ARGUMENT - if item order or sizes is not the same length as the number of items</li>
  * </ul>
  */
@@ -841,12 +840,12 @@
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the item order is null</li>
  *    <li>ERROR_INVALID_ARGUMENT - if the item order is not the same length as the number of items</li>
  * </ul>
  */
 void setItemOrder (int [] itemOrder) {
-    if (itemOrder is null) error (DWT.ERROR_NULL_ARGUMENT);
+    // DWT extension: allow null array
+    //if (itemOrder is null) error (DWT.ERROR_NULL_ARGUMENT);
     int itemCount = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
     if (itemOrder.length !is itemCount) error (DWT.ERROR_INVALID_ARGUMENT);
 
@@ -905,7 +904,8 @@
  * </ul>
  */
 void setItemSizes (Point [] sizes) {
-    if (sizes is null) error (DWT.ERROR_NULL_ARGUMENT);
+    // DWT extension: allow null array
+    //if (sizes is null) error (DWT.ERROR_NULL_ARGUMENT);
     int count = OS.SendMessage (handle, OS.RB_GETBANDCOUNT, 0, 0);
     if (sizes.length !is count) error (DWT.ERROR_INVALID_ARGUMENT);
     REBARBANDINFO rbBand;