Mercurial > projects > dwt-win
comparison dwt/dwthelper/ResourceBundle.d @ 336:f866e80af235
Remove tango deprecation warnings.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 18 Feb 2009 19:26:35 +0100 |
parents | 27479f54069d |
children |
comparison
equal
deleted
inserted
replaced
335:47b37f126740 | 336:f866e80af235 |
---|---|
6 import tango.text.Util; | 6 import tango.text.Util; |
7 import tango.io.Stdout; | 7 import tango.io.Stdout; |
8 | 8 |
9 import dwt.DWT; | 9 import dwt.DWT; |
10 import dwt.dwthelper.utils; | 10 import dwt.dwthelper.utils; |
11 import tango.io.File; | 11 import tango.io.device.File; |
12 import tango.text.locale.Core; | 12 import tango.text.locale.Core; |
13 | 13 |
14 class ResourceBundle { | 14 class ResourceBundle { |
15 | 15 |
16 String[ String ] map; | 16 String[ String ] map; |
166 public static ResourceBundle getBundle( ImportData data ){ | 166 public static ResourceBundle getBundle( ImportData data ){ |
167 return new ResourceBundle( data ); | 167 return new ResourceBundle( data ); |
168 } | 168 } |
169 public static ResourceBundle getBundle( String name ){ | 169 public static ResourceBundle getBundle( String name ){ |
170 try{ | 170 try{ |
171 scope f = new File(name); | 171 return new ResourceBundle( cast(String) File.get(name) ); |
172 return new ResourceBundle( cast(String) f.read() ); | |
173 } | 172 } |
174 catch( IOException e){ | 173 catch( IOException e){ |
175 e.msg ~= " file:" ~ name; | 174 e.msg ~= " file:" ~ name; |
176 throw e; | 175 throw e; |
177 } | 176 } |