changeset 318:827aebee255f

String version for Widget getData,setData
author Frank Benoit <benoit@tionex.de>
date Tue, 16 Sep 2008 15:51:48 +0200
parents 6f57d3b9947c
children 57e961636f92
files dwt/widgets/Widget.d
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/widgets/Widget.d	Tue Sep 16 15:28:56 2008 +0200
+++ b/dwt/widgets/Widget.d	Tue Sep 16 15:51:48 2008 +0200
@@ -562,6 +562,10 @@
     checkWidget();
     return (state & KEYED_DATA) !is 0 ? (cast(ArrayWrapperObject)data).array[0] : data;
 }
+public String getDataStr () {
+    return stringcast( getData() );
+}
+
 /**
  * Returns the application defined property of the receiver
  * with the specified name, or null if it has not been set.
@@ -596,6 +600,9 @@
     }
     return null;
 }
+public Object getDataStr (String key) {
+    return stringcast( getData(key) );
+}
 
 /**
  * Returns the <code>Display</code> that is associated with
@@ -1409,6 +1416,9 @@
         this.data = data;
     }
 }
+public void setDataStr (String data) {
+    setData( stringcast(data));
+}
 
 /**
  * Sets the application defined property of the receiver
@@ -1478,6 +1488,9 @@
         }
     }
 }
+public void setDataStr (String key, Object value) {
+    setData(key, stringcast(value));
+}
 
 void setForegroundColor (GtkWidget* handle, GdkColor* color) {
     auto style = OS.gtk_widget_get_modifier_style (handle);