class: SimpleView
authorClaus Gittinger <cg@exept.de>
Tue, 01 Sep 2015 18:42:33 +0200
changeset 6906 f032cb9bedd3
parent 6904 eff65cefac62
child 6907 94dbd3782c96
class: SimpleView added: #flash:withColor: changed: #flash:
SimpleView.st
--- a/SimpleView.st	Fri Aug 14 07:38:19 2015 +0200
+++ b/SimpleView.st	Tue Sep 01 18:42:33 2015 +0200
@@ -10089,7 +10089,27 @@
      when problem or warning conditions arise.
      Someone may redefine this to flash its contents (instead of black/white)."
 
-    self fill:self blackColor.
+    self flash:messageOrNil withColor:self blackColor.
+
+    "
+     |v|
+
+     v := View new openAndWait.
+     Delay waitForSeconds:2.
+     v flash:'Hello World' withColor:Color red.
+     Delay waitForSeconds:2.
+     v destroy
+    "
+!
+
+flash:messageOrNil withColor:flashColor
+    "flash the view - fill it black, then white, finally
+     redraw completely.
+     Can be used to wakeup the user :-)
+     when problem or warning conditions arise.
+     Someone may redefine this to flash its contents (instead of black/white)."
+
+    self fill:flashColor.
     messageOrNil notNil ifTrue:[
         self withForeground:Color white do:[
             self displayString:messageOrNil centeredAt:(self center).