Errors building dwt with latest tango
Frank Benoit
keinfarbton at googlemail.com
Tue Jul 1 06:15:14 PDT 2008
Yes, here is the fix i used for dwt-linux, i hope this works from the web newsreader.. :
diff -r cc1d3de0e80b dwt/custom/DefaultContent.d
--- a/dwt/custom/DefaultContent.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/custom/DefaultContent.d Tue Jul 01 08:35:34 2008 +0200
@@ -23,7 +23,7 @@ import dwt.custom.StyledText;
import dwt.custom.StyledText;
import dwt.dwthelper.utils;
-static import tango.io.FileConst;
+static import tango.io.model.IFile;
static import tango.text.Text;
alias tango.text.Text.Text!(char) StringBuffer;
diff -r cc1d3de0e80b dwt/custom/StyledText.d
--- a/dwt/custom/StyledText.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/custom/StyledText.d Tue Jul 01 08:35:34 2008 +0200
@@ -85,7 +85,7 @@ import dwt.dwthelper.Runnable;
static import tango.text.Text;
static import tango.text.Util;
-static import tango.io.FileConst;
+static import tango.io.model.IFile;
static import tango.text.convert.Utf;
import tango.util.Convert;
import dwt.dwthelper.utils;
diff -r cc1d3de0e80b dwt/dwthelper/File.d
--- a/dwt/dwthelper/File.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/dwthelper/File.d Tue Jul 01 08:35:34 2008 +0200
@@ -5,7 +5,7 @@ module dwt.dwthelper.File;
import dwt.dwthelper.utils;
-static import tango.io.FileConst;
+static import tango.io.model.IFile;
static import tango.io.FilePath;
static import tango.io.FileSystem;
@@ -19,10 +19,10 @@ public class File {
private tango.io.FilePath.FilePath mFilePath;
static this(){
- separator = tango.io.FileConst.FileConst.PathSeparatorString;
- separatorChar = tango.io.FileConst.FileConst.PathSeparatorChar;
- pathSeparator = tango.io.FileConst.FileConst.SystemPathString;
- pathSeparatorChar = tango.io.FileConst.FileConst.SystemPathChar;
+ separator = tango.io.model.IFile.FileConst.PathSeparatorString;
+ separatorChar = tango.io.model.IFile.FileConst.PathSeparatorChar;
+ pathSeparator = tango.io.model.IFile.FileConst.SystemPathString;
+ pathSeparatorChar = tango.io.model.IFile.FileConst.SystemPathChar;
}
public this ( String pathname ){
diff -r cc1d3de0e80b dwt/dwthelper/InflaterInputStream.d
--- a/dwt/dwthelper/InflaterInputStream.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/dwthelper/InflaterInputStream.d Tue Jul 01 08:35:34 2008 +0200
@@ -6,6 +6,7 @@ public import dwt.dwthelper.InputStream;
public import dwt.dwthelper.InputStream;
import dwt.dwthelper.utils;
import tango.io.Stdout;
+import tango.io.Conduit;
import tango.io.compress.ZlibStream;
class InputStreamWrapper : tango.io.model.IConduit.InputStream {
@@ -20,6 +21,10 @@ class InputStreamWrapper : tango.io.mode
int res = istr.read( cast(byte[])dst );
return res;
}
+ void[] load (void[] dst = null) {
+ return Conduit.load (this, dst);
+ }
+
tango.io.model.IConduit.InputStream clear (){
return this;
diff -r cc1d3de0e80b dwt/dwthelper/utils.d
--- a/dwt/dwthelper/utils.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/dwthelper/utils.d Tue Jul 01 08:35:34 2008 +0200
@@ -149,15 +149,15 @@ class Integer : ValueWrapperT!(int) {
}
public static String toHexString( int i ){
- return tango.text.convert.Integer.toString(i, tango.text.convert.Integer.Style.Hex );
+ return tango.text.convert.Integer.toString(i, "x" );
}
public static String toOctalString( int i ){
- return tango.text.convert.Integer.toString(i, tango.text.convert.Integer.Style.Octal );
+ return tango.text.convert.Integer.toString(i, "o" );
}
public static String toBinaryString( int i ){
- return tango.text.convert.Integer.toString(i, tango.text.convert.Integer.Style.Binary );
+ return tango.text.convert.Integer.toString(i, "b" );
}
public static String toString( int i ){
@@ -637,12 +637,10 @@ static String toHex(uint value, bool pre
static String toHex(uint value, bool prefix = true, int radix = 8){
return tango.text.convert.Integer.toString(
value,
- radix is 10 ? tango.text.convert.Integer.Style.Signed :
- radix is 8 ? tango.text.convert.Integer.Style.Octal :
- radix is 16 ? tango.text.convert.Integer.Style.Hex :
- tango.text.convert.Integer.Style.Signed,
- prefix ? tango.text.convert.Integer.Flags.Prefix : tango.text.convert.Integer.Flags.None
- );
+ radix is 10 ? "d" :
+ radix is 8 ? "o" :
+ radix is 16 ? "x" :
+ "d" );
}
class RuntimeException : Exception {
diff -r cc1d3de0e80b dwt/widgets/DirectoryDialog.d
--- a/dwt/widgets/DirectoryDialog.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/widgets/DirectoryDialog.d Tue Jul 01 08:35:34 2008 +0200
@@ -23,7 +23,7 @@ import dwt.widgets.Shell;
import dwt.widgets.Shell;
import dwt.widgets.Display;
-static import tango.io.FileConst;
+static import tango.io.model.IFile;
static import tango.text.Util;
/**
diff -r cc1d3de0e80b dwt/widgets/FileDialog.d
--- a/dwt/widgets/FileDialog.d Tue Jun 24 22:12:18 2008 +0200
+++ b/dwt/widgets/FileDialog.d Tue Jul 01 08:35:34 2008 +0200
@@ -22,7 +22,7 @@ import dwt.widgets.Display;
import dwt.widgets.Display;
import dwt.dwthelper.utils;
-static import tango.io.FileConst;
+static import tango.io.model.IFile;
static import tango.text.Util;
static import tango.text.Text;
More information about the Digitalmars-d-dwt
mailing list