#BUGFIX by exept draft
authorClaus Gittinger <cg@exept.de>
Thu, 06 Feb 2020 17:52:08 +0100
changeset 3851 8251db282466
parent 3850 91824773c619
child 3852 0b3d22d37c50
#BUGFIX by exept class: ShowMeHowItWorks changed: #do:from: #doStream:from: #findComponent:in: #waitFor:timeout:
ShowMeHowItWorks.st
--- a/ShowMeHowItWorks.st	Mon Feb 03 19:20:47 2020 +0100
+++ b/ShowMeHowItWorks.st	Thu Feb 06 17:52:08 2020 +0100
@@ -627,7 +627,9 @@
         ].
         Delay waitForSeconds:0.1.
         Timestamp now > endTime ifTrue:[
-            self error:('component %1 not present after %2' bindWith:componentName with:seconds)
+            self error:('component %1 not present after %2' bindWith:componentName with:seconds).
+            "/ if proceeded, just return.
+            ^ self.
         ]
     ] loop
 ! !
@@ -1624,15 +1626,18 @@
             item := anApplicationOrViewOrMenuItem tabAtIndex:idx.
         ] ifFalse:[
             idxString := idxString withoutQuotes.
-            item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab tabItem rawLabel = idxString].
+            item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab tabItem label = idxString].
             item isNil ifTrue:[
-                item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab printableLabel = idxString].
+                item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab tabItem rawLabel = idxString].
                 item isNil ifTrue:[
-                    item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab activeHelpKey = idxString].
+                    item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab printableLabel = idxString].
+                    item isNil ifTrue:[
+                        item := anApplicationOrViewOrMenuItem tabForWhich:[:tab | tab activeHelpKey = idxString].
+                    ].
                 ].
             ].
         ].
-        self assert:item notNil.
+        self assert:item notNil message:('No tab named: %1' bindWith:idxString).
         ^ ItemInView new view:anApplicationOrViewOrMenuItem item:item boundsInView:(item layout)
     ].
 
@@ -2313,8 +2318,8 @@
 
         [
             Error handle:[:ex |
-                Dialog warn:(self class classResources 
-                                    stringWithCRs:'An error was encountered in the show:\\%1' 
+                Dialog information:(self class classResources 
+                                    stringWithCRs:'Sorry, the show is over\\(due to: %1)' 
                                     with:ex description withCRs)
             ] do:[
                 self doStream:(specArray readStream) from:startLabelOrNil
@@ -2467,7 +2472,16 @@
 
         [opStream atEnd] whileFalse:[
             nextCommand := opStream next.
-            self doCommand:nextCommand.
+            Error handle:[:ex |
+                (Dialog confirm:(self class classResources 
+                                    stringWithCRs:'An error was encountered in the show:\\%1\\Proceed anyway (may result in followup errors to be encountered)?' 
+                                    with:ex description withCRs)
+                ) ifFalse:[
+                    ex reject
+                ].
+            ] do:[
+                self doCommand:nextCommand.
+            ].
 
             Display shiftDown ifTrue:[
                 (IntroShownCount ? 0) > 3 ifFalse:[