Mercurial > projects > dwt2
diff org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.d @ 112:9f4c18c268b2
Update to compile and execute with dmd 2.052.
author | kntroh |
---|---|
date | Wed, 16 Mar 2011 21:53:53 +0900 |
parents | 4e5843b771cc |
children |
line wrap: on
line diff
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.d Sat Nov 13 14:15:51 2010 +0100 +++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.d Wed Mar 16 21:53:53 2011 +0900 @@ -25,8 +25,13 @@ import org.eclipse.swt.widgets.CoolBar; import org.eclipse.swt.widgets.CoolItem; import org.eclipse.swt.widgets.Shell; +import java.lang.all; -import tango.util.Convert; +version(Tango){ + import tango.util.Convert; +} else { // Phobos + import std.conv; +} void main () { auto display = new Display (); @@ -35,7 +40,7 @@ for (int i=0; i<2; i++) { auto item = new CoolItem (bar, SWT.NONE); auto button = new Button (bar, SWT.PUSH); - button.setText ("Button " ~ to!(char[])(i)); + button.setText ("Button " ~ to!(String)(i)); auto size = button.computeSize (SWT.DEFAULT, SWT.DEFAULT); item.setPreferredSize (item.computeSize (size.x, size.y)); item.setControl (button);