WarningBox.st
changeset 1173 86440dfaca06
parent 693 8369529a2ac4
child 1365 aa6a855b5013
--- a/WarningBox.st	Tue Apr 01 14:54:08 1997 +0200
+++ b/WarningBox.st	Tue Apr 01 14:54:41 1997 +0200
@@ -138,11 +138,21 @@
      This is the default image; you can overwrite this in a concrete
      instance with the image: message"
 
+    <resource: #style (#warningBoxIcon #warningBoxIconFile)>
+
+    |img imgFileName|
+
     WarnBitmap isNil ifTrue:[
-	WarnBitmap := Image fromFile:'bitmaps/Warning.xbm'.
-	WarnBitmap notNil ifTrue:[
-	    WarnBitmap := WarnBitmap on:Display
-	]
+        img := StyleSheet at:'warningBoxIcon'.
+        img notNil ifTrue:[
+            WarnBitmap := img
+        ] ifFalse:[
+            imgFileName := StyleSheet at:'warningBoxIconFile' default:'bitmaps/Warning.xbm'.
+            WarnBitmap := Image fromFile:imgFileName.
+        ].
+        WarnBitmap notNil ifTrue:[
+            WarnBitmap := WarnBitmap on:Display
+        ]
     ].
     ^ WarnBitmap
 
@@ -164,21 +174,18 @@
     "
 
     "Created: 17.11.1995 / 18:16:47 / cg"
+    "Modified: 1.4.1997 / 14:28:07 / cg"
 ! !
 
 !WarningBox class methodsFor:'styles'!
 
 updateStyleCache
-    "extract values from the styleSheet and cache them in class variables"
-
-    <resource: #style (#warningBoxIcon)>
+    "extract values from the styleSheet and cache them in class variables.
+     Here, the cached infoBitmap is simply flushed."
 
-    |img|
+    WarnBitmap := nil
 
-    img := StyleSheet at:'warningBoxIcon'.
-    img notNil ifTrue:[WarnBitmap := img on:Display].
-
-    "Modified: 1.3.1996 / 13:51:43 / cg"
+    "Modified: 1.4.1997 / 14:44:59 / cg"
 ! !
 
 !WarningBox methodsFor:'initialization'!
@@ -206,5 +213,5 @@
 !WarningBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.20 1996-05-28 14:59:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.21 1997-04-01 12:54:23 cg Exp $'
 ! !