# HG changeset patch # User Jacob Carlborg # Date 1243196460 -7200 # Node ID 623ff6db5f1d1643cfab6475e6448cb502d94d9f # Parent 6541b60caf7973c87fea65150cae4ff8768e0e2a Updated to Tango 0.99.8 diff -r 6541b60caf79 -r 623ff6db5f1d dwt/dwthelper/File.d --- a/dwt/dwthelper/File.d Tue Mar 24 20:55:08 2009 +0100 +++ b/dwt/dwthelper/File.d Sun May 24 22:21:00 2009 +0200 @@ -8,6 +8,7 @@ static import tango.io.model.IFile; static import tango.io.FilePath; static import tango.io.FileSystem; +import tango.sys.Environment; public class File { @@ -66,11 +67,10 @@ implMissing( __FILE__, __LINE__ ); return false; } - + public char[] getAbsolutePath(){ - return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath ).toString; + return mFilePath.absolute(Environment.cwd).toString; } - public dwt.dwthelper.File.File getAbsoluteFile(){ return new File( getAbsolutePath() ); } diff -r 6541b60caf79 -r 623ff6db5f1d dwt/dwthelper/FileInputStream.d --- a/dwt/dwthelper/FileInputStream.d Tue Mar 24 20:55:08 2009 +0100 +++ b/dwt/dwthelper/FileInputStream.d Sun May 24 22:21:00 2009 +0200 @@ -6,17 +6,7 @@ import dwt.dwthelper.utils; import dwt.dwthelper.File; import dwt.dwthelper.InputStream; - -version (LDC) -{ - import Tango = tango.io.device.File; - alias Tango.File FileConduit; -} - -else - import tango.io.device.FileConduit; - - +import TangoFile = tango.io.device.File; import tango.io.protocol.Reader; import tango.core.Exception; import tango.text.convert.Format; @@ -25,7 +15,7 @@ alias dwt.dwthelper.InputStream.InputStream.read read; - private FileConduit conduit; + private TangoFile.File conduit; private ubyte[] buffer; private int buf_pos; private int buf_size; @@ -33,13 +23,13 @@ private bool eof; public this ( char[] name ){ - conduit = new FileConduit( name ); + conduit = new TangoFile.File( name ); buffer = new ubyte[]( BUFFER_SIZE ); } public this ( dwt.dwthelper.File.File file ){ implMissing( __FILE__, __LINE__ ); - conduit = new FileConduit( file.getAbsolutePath(), FileConduit.ReadExisting ); + conduit = new TangoFile.File( file.getAbsolutePath(), TangoFile.File.ReadExisting); buffer = new ubyte[]( BUFFER_SIZE ); } diff -r 6541b60caf79 -r 623ff6db5f1d dwt/dwthelper/ResourceBundle.d --- a/dwt/dwthelper/ResourceBundle.d Tue Mar 24 20:55:08 2009 +0100 +++ b/dwt/dwthelper/ResourceBundle.d Sun May 24 22:21:00 2009 +0200 @@ -8,7 +8,7 @@ import dwt.DWT; import dwt.dwthelper.utils; -import tango.io.File; +import tango.io.device.File; import tango.text.locale.Core; import tango.util.log.Trace; @@ -170,8 +170,7 @@ } public static ResourceBundle getBundle( String name ){ try{ - scope f = new File(name); - return new ResourceBundle( cast(String) f.read() ); + return new ResourceBundle( cast(String) File.get(name) ); } catch( IOException e){ e.msg ~= " file:" ~ name; diff -r 6541b60caf79 -r 623ff6db5f1d dwt/dwthelper/System.d --- a/dwt/dwthelper/System.d Tue Mar 24 20:55:08 2009 +0100 +++ b/dwt/dwthelper/System.d Sun May 24 22:21:00 2009 +0200 @@ -6,16 +6,7 @@ import tango.core.Exception; import tango.io.Stdout; import tango.io.model.IFile; - -version (LDC) -{ - import tango.io.stream.Format; - alias FormatOutput Print; -} - -else - import tango.io.Print; - +import tango.io.stream.Format; import tango.stdc.locale; import tango.stdc.stdlib : exit; import tango.sys.Environment; @@ -104,8 +95,8 @@ struct Out { - static Print!(char) delegate(char[] fmt,...) println; - static Print!(char) delegate(char[] fmt,...) print; + static FormatOutput!(char) delegate(char[] fmt,...) println; + static FormatOutput!(char) delegate(char[] fmt,...) print; static this () { @@ -116,8 +107,8 @@ struct Err { - static Print!(char) delegate(char[] fmt,...) println; - static Print!(char) delegate(char[] fmt,...) print; + static FormatOutput!(char) delegate(char[] fmt,...) println; + static FormatOutput!(char) delegate(char[] fmt,...) print; static this () { diff -r 6541b60caf79 -r 623ff6db5f1d dwt/dwthelper/utils.d --- a/dwt/dwthelper/utils.d Tue Mar 24 20:55:08 2009 +0100 +++ b/dwt/dwthelper/utils.d Sun May 24 22:21:00 2009 +0200 @@ -10,15 +10,7 @@ public import tango.core.Exception : IllegalArgumentException, IOException, PlatformException; import tango.io.Stdout; - -version (LDC) -{ - import tango.io.stream.Format; - alias FormatOutput Print; -} - -else - import tango.io.Print; +import tango.io.stream.Format; public import tango.text.convert.Format; @@ -33,7 +25,7 @@ import tango.util.log.Trace; import tango.text.UnicodeData; -static import tango.util.collection.model.Seq; +//static import tango.util.collection.model.Seq; alias bool boolean; alias char[] String; @@ -852,7 +844,7 @@ ExceptionPrintStackTrace( e, Stderr ); } -void ExceptionPrintStackTrace( Exception e, Print!(char) print ){ +void ExceptionPrintStackTrace( Exception e, FormatOutput!(char) print ){ Exception exception = e; while( exception !is null ){ print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg ); @@ -1001,7 +993,7 @@ return res; } -int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){ +/*int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){ int res = -1; int idx = 0; foreach( p; seq ){ @@ -1012,7 +1004,7 @@ idx++; } return res; -} +}*/ void PrintStackTrace( int deepth = 100, String prefix = "trc" ){ auto e = new Exception( null ); diff -r 6541b60caf79 -r 623ff6db5f1d dwt/widgets/Group.d --- a/dwt/widgets/Group.d Tue Mar 24 20:55:08 2009 +0100 +++ b/dwt/widgets/Group.d Sun May 24 22:21:00 2009 +0200 @@ -122,7 +122,7 @@ } NSView contentView () { - return contentView; + return contentView_; } void deregister () {