Mercurial > projects > dwt-win
changeset 309:8117dc3a8faa
String version for Widget getData,setData
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 15 Sep 2008 03:40:57 +0200 |
parents | 8d53428f9be0 |
children | d650eede28b3 |
files | dwt/widgets/Widget.d |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/widgets/Widget.d Sun Sep 14 19:58:20 2008 +0200 +++ b/dwt/widgets/Widget.d Mon Sep 15 03:40:57 2008 +0200 @@ -554,6 +554,9 @@ 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 @@ -589,6 +592,9 @@ } return null; } +public String getDataStr (String key) { + return stringcast(getData(key)); +} /** * Returns the <code>Display</code> that is associated with @@ -1127,6 +1133,10 @@ this.data = data; } } +/// DWT extension +public void setDataStr (String data) { + setData(stringcast(data)); +} /** * Sets the application defined property of the receiver @@ -1196,6 +1206,10 @@ } } } +/// DWT extension +public void setDataStr (String key, String value) { + setData( key, stringcast(value)); +} bool sendFocusEvent (int type) { sendEvent (type);