diff dwt/widgets/Button.d @ 255:5a30aa9820f3

removed tango.stdc.stringz imports and allow null for arrays and string arguments.
author Frank Benoit <benoit@tionex.de>
date Sun, 15 Jun 2008 22:32:20 +0200
parents 34409a2fc053
children c0d810de7093
line wrap: on
line diff
--- a/dwt/widgets/Button.d	Sun Jun 08 15:11:48 2008 +0200
+++ b/dwt/widgets/Button.d	Sun Jun 15 22:32:20 2008 +0200
@@ -26,7 +26,6 @@
 import dwt.widgets.TypedListener;
 import dwt.widgets.Decorations;
 
-import tango.stdc.stringz;
 import tango.io.Stdout;
 
 /**
@@ -782,9 +781,6 @@
  * </p>
  * @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>
@@ -792,7 +788,8 @@
  */
 public void setText (String string) {
     checkWidget ();
-    if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
+    // DWT extension: allow null for zero length string
+    //if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if ((style & DWT.ARROW) !is 0) return;
     text = string;
     char [] chars = fixMnemonic (string);