diff dwt/dwthelper/System.d @ 311:77fa7f3ab37e

Additions for jface.text
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 01:33:00 +0200
parents 7ca3f26319f1
children 8235a17d9255
line wrap: on
line diff
--- a/dwt/dwthelper/System.d	Tue Aug 26 02:47:19 2008 +0200
+++ b/dwt/dwthelper/System.d	Mon Sep 08 01:33:00 2008 +0200
@@ -146,6 +146,13 @@
         return (*cast(Object *)&x).toHash();
     }
 
+    public static String getProperty( String key, String defval ){
+        String res = getProperty(key);
+        if( res ){
+            return res;
+        }
+        return defval;
+    }
     public static String getProperty( String key ){
         /* Get values for local dwt specific keys */
         String* p;
@@ -176,13 +183,20 @@
 
     }
 
-    class Output {
+    static class Output {
         public void println( String str ){
             implMissing( __FILE__, __LINE__ );
         }
     }
 
-    public static Output out__;
+    private static Output err__;
+    public static Output err(){
+        if( err__ is null ){
+            err__ = new Output();
+        }
+        return err__;
+    }
+    private static Output out__;
     public static Output out_(){
         if( out__ is null ){
             out__ = new Output();