Changeset 200:fef1e3b37378

Show
Ignore:
Timestamp:
04/11/08 11:15:55 (5 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

sync with dwt-linux

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/dwthelper/ResourceBundle.d

    r197 r200  
    99import dwt.DWT; 
    1010import dwt.dwthelper.utils; 
     11import tango.io.File; 
    1112 
    1213class ResourceBundle { 
     
    6162                    esc = false; 
    6263                    switch( c ){ 
    63                     case 't': c = '\t'; break; 
    64                     case 'n': c = '\n'; break; 
     64                    case 't' : c = '\t'; break; 
     65                    case 'n' : c = '\n'; break; 
    6566                    case '\\': c = '\\'; break; 
    6667                    case '\"': c = '\"'; break; 
     68                    //case ':' : c = ':' ; break; 
    6769                    default: break; 
    6870                    } 
     
    121123    } 
    122124 
     125    public static ResourceBundle getBundle( ImportData data ){ 
     126        return new ResourceBundle( cast(char[]) data.data ); 
     127    } 
    123128    public static ResourceBundle getBundle( char[] name ){ 
    124         return new ResourceBundle( null ); 
     129        try{ 
     130            scope f = new File(name); 
     131            return new ResourceBundle( cast(char[]) f.read() ); 
     132        } 
     133        catch( IOException e){ 
     134            e.msg ~= " file:" ~ name; 
     135            throw e; 
     136        } 
    125137    } 
    126138    public static ResourceBundle getBundleFromData( char[] data ){ 
  • dwt/dwthelper/utils.d

    r199 r200  
    7373    public static Boolean TRUE; 
    7474    public static Boolean FALSE; 
     75 
     76    static this(){ 
     77        TRUE  = new Boolean(true); 
     78        FALSE = new Boolean(false); 
     79    } 
    7580    public this( bool v ){ 
    7681        super(v); 
     
    126131 
    127132    public this ( char[] s ){ 
    128             implMissing( __FILE__, __LINE__ ); 
    129             super(0); 
     133        super(parseInt(s)); 
    130134    } 
    131135 
     
    186190 
    187191    public static Integer valueOf( char[] s ){ 
    188         implMissing( __FILE__, __LINE__ ); 
    189         return null; 
     192        return valueOf( parseInt(s)); 
    190193    } 
    191194 
    192195    public static Integer valueOf( int i ){ 
    193         implMissing( __FILE__, __LINE__ ); 
    194         return null; 
     196        return new Integer(i); 
    195197    } 
    196198 
     
    862864        } 
    863865    } 
     866    return true; 
    864867} 
    865868