Mercurial > projects > dwt2
diff org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.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 | 536e43f63c81 |
line wrap: on
line diff
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.d Sat Nov 13 14:15:51 2010 +0100 +++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.d Wed Mar 16 21:53:53 2011 +0900 @@ -33,8 +33,13 @@ import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.GridData; +import java.lang.all; -import tango.util.Convert; +version(Tango){ + import tango.util.Convert; +} else { // Phobos + import std.conv; +} static Display display; static Shell shell; @@ -53,7 +58,7 @@ for (int j = 0; j < 5; j++) { int width = 0; ToolItem item = new ToolItem(toolBar, SWT.PUSH); - item.setText("B" ~ to!(char[])(j)); + item.setText("B" ~ to!(String)(j)); width = item.getWidth(); /* find the width of the widest tool */ if (width > minWidth) minWidth = width;