Mercurial > projects > dwt-mac
diff dwt/dwthelper/ResourceBundle.d @ 61:c74ba20de292
Fix: The application responds to events now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Tue, 23 Dec 2008 00:35:24 +0100 |
parents | 380af2bdd8e5 |
children | 38807a925e24 |
line wrap: on
line diff
--- a/dwt/dwthelper/ResourceBundle.d Mon Dec 22 15:10:19 2008 +0100 +++ b/dwt/dwthelper/ResourceBundle.d Tue Dec 23 00:35:24 2008 +0100 @@ -9,7 +9,12 @@ import dwt.DWT; import dwt.dwthelper.utils; import dwt.dwthelper.utils : IOException; -import tango.io.File; + +version (LDC) + import tango.io.device.File; + +else + import tango.io.File; class ResourceBundle { @@ -128,8 +133,14 @@ } public static ResourceBundle getBundle( char[] name ){ try{ - scope f = new File(name); - return new ResourceBundle( cast(char[]) f.read() ); + version (LDC) + return new ResourceBundle( cast(char[]) File.read(name) ); + + else + { + scope f = new File(name); + return new ResourceBundle( cast(char[]) f.read() ); + } } catch( IOException e){ e.msg ~= " file:" ~ name;