#FEATURE by exept draft
authorClaus Gittinger <cg@exept.de>
Fri, 15 Nov 2019 00:42:20 +0100
changeset 3821 798167a7637b
parent 3820 2c48933f35cb
child 3822 8f40c5d2a468
#FEATURE by exept class: ShowMeHowItWorks changed: #findComponent:in: #showing:saying:do:
ShowMeHowItWorks.st
--- a/ShowMeHowItWorks.st	Thu Nov 14 21:44:16 2019 +0100
+++ b/ShowMeHowItWorks.st	Fri Nov 15 00:42:20 2019 +0100
@@ -519,16 +519,21 @@
             [
                 |sentence|
                 sentence := (sentenceOrNil ? xLatedMessage) copy withCRs replaceAny:c'\t' with:(Character space).
-                sentence := sentence copy withCRs replaceAny:c'\n\r' with:(Character space).
-                sentence := sentence asLowercase.
-                pronunciations notNil ifTrue:[
-                    pronunciations keysAndValuesDo:[:word :pronounced |
-                        (sentence includesString:word) ifTrue:[
-                            sentence := sentence copyReplaceString:word withString:pronounced
+                sentence asStringCollection do:[:eachLineIn |
+                    |eachLine|
+
+                    eachLine := eachLineIn.
+                    "/ eachLine := eachLine copy withCRs replaceAny:c'\n\r' with:(Character space).
+                    eachLine := eachLine asLowercase.
+                    pronunciations notNil ifTrue:[
+                        pronunciations keysAndValuesDo:[:word :pronounced |
+                            (eachLine includesString:word) ifTrue:[
+                                eachLine := eachLine copyReplaceString:word withString:pronounced
+                            ]
                         ]
-                    ]
+                    ].
+                    self tell:eachLine.
                 ].
-                self tell:sentence.
                 talkDone signal
             ] fork.
             
@@ -1557,7 +1562,7 @@
                 self halt.
             ]
         ] ifFalse:[
-            anApplicationOrViewOrMenuItem isMenu ifFalse:[
+            (anApplicationOrViewOrMenuItem askFor:#isMenu) ifFalse:[
                 self assert:false message:'container is not a menu'.
             ].
             "/ a menu item