changeset 314:0f7ac29ac726

merge
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 01:35:33 +0200
parents 9f01a0643e26 (diff) 77fa7f3ab37e (current diff)
children 21959e16bc1e
files dwt/dwthelper/utils.d
diffstat 3 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d	Mon Sep 08 01:33:00 2008 +0200
+++ b/dwt/dwthelper/utils.d	Mon Sep 08 01:35:33 2008 +0200
@@ -860,6 +860,10 @@
     return str;
 }
 
+/++
+ + This is like tango.stdc.stringz.toStringz, but in case of an empty input string,
+ + this function returns a pointer to a null value instead of a null ptr.
+ +/
 public char* toStringzValidPtr( String src ){
     if( src ){
         return src.toStringz();
--- a/dwt/graphics/Device.d	Mon Sep 08 01:33:00 2008 +0200
+++ b/dwt/graphics/Device.d	Mon Sep 08 01:35:33 2008 +0200
@@ -698,9 +698,7 @@
     Device dev = cast(Device)user_data;
     if (dev.warningLevel is 0) {
         if (DEBUG || dev.debugging) {
-            foreach( msg; (new Exception ("")).info ){
-                Stderr.formatln( "trc {}", msg );
-            }
+            ExceptionPrintStackTrace(new Exception (""));
         }
         OS.g_log_default_handler (log_domain, log_level, message, user_data);
     }
--- a/dwt/widgets/TableItem.d	Mon Sep 08 01:33:00 2008 +0200
+++ b/dwt/widgets/TableItem.d	Mon Sep 08 01:35:33 2008 +0200
@@ -1234,7 +1234,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>
@@ -1244,7 +1243,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]);
     }
@@ -1276,9 +1274,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>
@@ -1286,7 +1281,6 @@
  */
 public void setText (int index, String string) {
     checkWidget ();
-    if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (_getText (index).equals (string)) return;
     int count = Math.max (1, parent.getColumnCount ());
     if (0 > index || index > count - 1) return;
@@ -1316,9 +1310,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>
@@ -1326,7 +1317,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);