#BUGFIX by exept draft
authorClaus Gittinger <cg@exept.de>
Fri, 18 Oct 2019 23:29:24 +0200
changeset 3792 7682b28c1e92
parent 3791 471326a17840
child 3793 4759769ba7a3
#BUGFIX by exept class: ShowMeHowItWorks changed: #findComponent:in: #findComponent:inAllApplications:ifMultiple:
ShowMeHowItWorks.st
--- a/ShowMeHowItWorks.st	Fri Oct 18 23:10:44 2019 +0200
+++ b/ShowMeHowItWorks.st	Fri Oct 18 23:29:24 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:libtool2' }"
 
 "{ NameSpace: Smalltalk }"
@@ -64,7 +66,7 @@
      ShowMeHowItWorks do:
         #(
             (language: de)
-            (show: 'üben üben üben')
+            (show: 'üben üben üben')
             (wait: 0.5)
             (moveTo: NameOfComponent)
         )    
@@ -83,7 +85,7 @@
      ShowMeHowItWorks do:
         #(
             (language: de)
-            (show: 'üben üben üben')
+            (show: 'üben üben üben')
             (wait: 0.5)
             (moveTo: NameOfComponent)
         )    
@@ -105,7 +107,7 @@
      ShowMeHowItWorks 
         do:#(
             (language: de)
-            (show: 'üben üben üben')
+            (show: 'üben üben üben')
             (wait: 0.5)
             (moveTo: NameOfComponent)
         )
@@ -125,7 +127,7 @@
      ShowMeHowItWorks 
         do:#(
             (language: de)
-            (show: 'üben üben üben')
+            (show: 'üben üben üben')
             (wait: 0.5)
             (moveTo: NameOfComponent)
         )
@@ -1041,7 +1043,10 @@
             window := app submenu.
         ]
     ].
-    
+    window notNil ifTrue:[
+        window shown ifFalse:[^ nil].
+    ].
+
     "/ mhmh - search through all widgets of anApplication; 
     "/ maybe it was not created via the builder/spec,
     "/ or it has changed its name.
@@ -1049,7 +1054,7 @@
     foundByName := OrderedCollection new. 
     foundByTitle := OrderedCollection new. 
     foundByLabel := OrderedCollection new.
-    
+
     window withAllSubViewsDo:[:each |
         |foundIt|
         
@@ -1167,6 +1172,14 @@
                 ].
             ].
         ].
+        candidates isEmpty ifTrue:[
+            Display allTopViews do:[:eachTopView |
+                component := self findComponent:componentName in:eachTopView.
+                component notNil ifTrue:[ 
+                    candidates add:component
+                ].
+            ]
+        ].
 
         candidates size == 1 ifTrue:[
             ^ candidates first