# HG changeset patch # User Frank Benoit # Date 1221573108 -7200 # Node ID 827aebee255fcc0984cb47777fd3e4760496d3ad # Parent 6f57d3b9947c8e70e85f235acadba59e62953432 String version for Widget getData,setData diff -r 6f57d3b9947c -r 827aebee255f dwt/widgets/Widget.d --- 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 Display 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);