diff dwt/widgets/TableItem.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents a155324d7a44
children 36f5cb12e1a2
line wrap: on
line diff
--- a/dwt/widgets/TableItem.d	Sat Apr 26 10:01:48 2008 +0200
+++ b/dwt/widgets/TableItem.d	Mon May 05 00:12:38 2008 +0200
@@ -43,7 +43,7 @@
 
 public class TableItem : Item {
     Table parent;
-    char[] [] strings;
+    String [] strings;
     Image [] images;
     bool checked, grayed, cached;
     int imageIndent, background = -1, foreground = -1;
@@ -384,7 +384,7 @@
             if (code is 0) return RECT.init;
             if (!hasImage) rect.right = rect.left;
             if (getText) {
-                char[] string = column is 0 ? text : strings !is null ? strings [column] : null;
+                String string = column is 0 ? text : strings !is null ? strings [column] : null;
                 if (string !is null) {
                     RECT textRect;
                     TCHAR[] buffer = StrToTCHARs (parent.getCodePage (), string, false);
@@ -599,7 +599,7 @@
     return imageIndent;
 }
 
-override char[] getNameText () {
+override String getNameText () {
     if ((parent.style & DWT.VIRTUAL) !is 0) {
         if (!cached) return "*virtual*"; //$NON-NLS-1$
     }
@@ -621,7 +621,7 @@
     return parent;
 }
 
-override public char[] getText () {
+override public String getText () {
     checkWidget();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     return super.getText ();
@@ -639,13 +639,13 @@
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  */
-public char[] getText (int index) {
+public String getText (int index) {
     checkWidget();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     if (index is 0) return getText ();
     if (strings !is null) {
         if (0 <= index && index < strings.length) {
-            char[] string = strings [index];
+            String string = strings [index];
             return string !is null ? string : "";
         }
     }
@@ -1166,11 +1166,11 @@
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  */
-public void setText (char[] [] strings) {
+public void setText (String [] strings) {
     checkWidget();
     if (strings is null) error (DWT.ERROR_NULL_ARGUMENT);
     for (int i=0; i<strings.length; i++) {
-        char[] string = strings [i];
+        String string = strings [i];
         if (string !is null) setText (i, string);
     }
 }
@@ -1189,7 +1189,7 @@
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  */
-public void setText (int index, char[] string) {
+public void setText (int index, String string) {
     checkWidget();
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (index is 0) {
@@ -1199,7 +1199,7 @@
     int count = Math.max (1, parent.getColumnCount ());
     if (0 > index || index > count - 1) return;
     if (strings is null && index !is 0)  {
-        strings = new char[][] (count);
+        strings = new String[] (count);
         strings [0] = text;
     }
     if (strings !is null) {
@@ -1236,7 +1236,7 @@
     redraw (index, true, false);
 }
 
-override public void setText (char[] string) {
+override public void setText (String string) {
     checkWidget();
     setText (0, string);
 }