diff dwt/widgets/TableItem.d @ 238:380bad9f6852

reverted char[] to String
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:42:55 +0200
parents de2578a843a7
children ce446666f5a2
line wrap: on
line diff
--- a/dwt/widgets/TableItem.d	Sat Apr 26 10:01:30 2008 +0200
+++ b/dwt/widgets/TableItem.d	Mon May 05 00:42:55 2008 +0200
@@ -12,6 +12,8 @@
  *******************************************************************************/
 module dwt.widgets.TableItem;
 
+import dwt.dwthelper.utils;
+
 
 
 import dwt.DWT;
@@ -567,7 +569,7 @@
     return 0;
 }
 
-override char[] getNameText () {
+override String getNameText () {
     if ((parent.style & DWT.VIRTUAL) !is 0) {
         if (!cached) return "*virtual*"; //$NON-NLS-1$
     }
@@ -589,7 +591,7 @@
     return parent;
 }
 
-public override char[] getText () {
+public override String getText () {
     checkWidget ();
     if (!parent.checkData (this)) error (DWT.ERROR_WIDGET_DISPOSED);
     return getText (0);
@@ -607,7 +609,7 @@
  *    <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)) error (DWT.ERROR_WIDGET_DISPOSED);
     int count = Math.max (1, parent.getColumnCount ());
@@ -616,7 +618,7 @@
     int modelIndex = parent.columnCount is 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex;
     OS.gtk_tree_model_get1 (parent.modelHandle, handle, modelIndex + Table.CELL_TEXT, cast(void**) &ptr);
     if (ptr is null) return "";
-    char[] res = tango.stdc.stringz.fromStringz( ptr ).dup;
+    String res = tango.stdc.stringz.fromStringz( ptr ).dup;
     OS.g_free (ptr);
     return res;
 }
@@ -1228,7 +1230,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);
     int count = Math.max (1, parent.getColumnCount ());
@@ -1249,7 +1251,7 @@
     cached = true;
 }
 
-public override void setText (char[] string) {
+public override void setText (String string) {
     checkWidget ();
     setText (0, string);
 }
@@ -1267,11 +1269,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);
     }
 }