#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Wed, 27 Mar 2019 15:22:26 +0100
changeset 8668 976bb82ebc0a
parent 8667 6b5cdd36a62f
child 8669 969a9b666cd3
#FEATURE by cg class: SimpleView class changed: #styleSheet return a non-nil dummy stylesheet if headless
SimpleView.st
--- a/SimpleView.st	Wed Mar 27 15:21:44 2019 +0100
+++ b/SimpleView.st	Wed Mar 27 15:22:26 2019 +0100
@@ -1310,10 +1310,12 @@
 !
 
 styleSheet
-    "return the view style sheet information (a dictionary)"
+    "return the view style sheet information (a dictionary).
+     Notice: returns a dummy styleSheet if headless"
 
     StyleSheet isNil ifTrue:[
-	self updateAllStyleCaches.
+        self updateAllStyleCaches.
+        StyleSheet isNil ifTrue:[^ ViewStyle new].
     ].
     ^ StyleSheet
 
@@ -1321,7 +1323,8 @@
      View styleSheet
     "
 
-    "Modified: 9.1.1997 / 13:47:42 / cg"
+    "Modified: / 09-01-1997 / 13:47:42 / cg"
+    "Modified: / 27-03-2019 / 11:11:55 / Claus Gittinger"
 !
 
 styleSheet:aViewStyle