#FEATURE by cg draft
authorClaus Gittinger <cg@exept.de>
Fri, 19 Jul 2019 21:33:44 +0200
changeset 3714 d3314ff81424
parent 3713 fa10e87dbf04
child 3715 8e37e3d91789
#FEATURE by cg class: ShowMeHowItWorks added: #show:for: comment/format in: #show: #showing:do: changed: #doStream:
ShowMeHowItWorks.st
--- a/ShowMeHowItWorks.st	Fri Jul 19 16:55:40 2019 +0200
+++ b/ShowMeHowItWorks.st	Fri Jul 19 21:33:44 2019 +0200
@@ -105,17 +105,29 @@
 !
 
 show:message
-    "execute operations while showing (and speaking) some message."
+    "showing (and speak) some message."
 
     <action>
     
     self showing:message do:nil
 
     "Created: / 19-07-2019 / 15:59:18 / Claus Gittinger"
+    "Modified (comment): / 19-07-2019 / 18:54:36 / Claus Gittinger"
+!
+
+show:message for:seconds
+    "showing (and speak) some message and wait for some time."
+
+    <action>
+    
+    self show:message.
+    self wait:seconds.
+
+    "Created: / 19-07-2019 / 18:54:20 / Claus Gittinger"
 !
 
 showing:message do:operationsOrNothing
-    "execute operations while showing (and speaking) some message."
+    "execute operationsOrNothing while showing (and speaking) some message."
 
     <action>
     
@@ -152,6 +164,7 @@
 
     "Created: / 19-07-2019 / 11:19:27 / Claus Gittinger"
     "Modified: / 19-07-2019 / 15:59:52 / Claus Gittinger"
+    "Modified (comment): / 19-07-2019 / 18:54:43 / Claus Gittinger"
 !
 
 wait:seconds
@@ -787,8 +800,11 @@
         [opStream atEnd] whileFalse:[
             self nextCommand.
             Display shiftDown ifTrue:[
-                self tell:'you stopped the shou, thank you, for watching'.
-                ^ AbortOperationRequest raise
+                (Dialog confirm:(self class classResources stringWithCRs:'Stop the demonstration?'))
+                ifTrue:[
+                    self tell:'you stopped the show, thank you, for watching'.
+                    ^ AbortOperationRequest raise
+                ].    
             ].    
         ].    
     ] ensure:[
@@ -824,7 +840,7 @@
 END"
 
     "Created: / 19-07-2019 / 10:52:24 / Claus Gittinger"
-    "Modified: / 19-07-2019 / 16:02:51 / Claus Gittinger"
+    "Modified: / 19-07-2019 / 18:56:13 / Claus Gittinger"
 !
 
 nextCommand