#DOCUMENTATION by exept draft
authorClaus Gittinger <cg@exept.de>
Tue, 01 Oct 2019 10:18:59 +0200
changeset 3773 e51451a38ba0
parent 3772 33679accc619
child 3774 271887d2ed74
#DOCUMENTATION by exept class: MethodFinderWindow changed: #search
MethodFinderWindow.st
--- a/MethodFinderWindow.st	Tue Oct 01 09:54:35 2019 +0200
+++ b/MethodFinderWindow.st	Tue Oct 01 10:18:59 2019 +0200
@@ -1123,7 +1123,7 @@
 search
     "Do a search based on the input in the various text editors. Return the receiver."
 
-    |tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf|
+    |tempReceiver tempAnswer tempArguments anArray resultArrayOrErrorString receiverWithArgument mf|
 
     self resultHolder value:nil.
     self classOfResultHolder value:nil.
@@ -1143,23 +1143,24 @@
     self withCursor:(Cursor execute) do:[
         mf := MethodFinder new.
         mf load:anArray.
-        resultArray := mf findMessage.
+        resultArrayOrErrorString := mf findMessage.
     ].
 
-    (resultArray isString "(resultArray at:1) includesSubString:'no single'") ifTrue:[
+    (resultArrayOrErrorString isString "(resultArray at:1) includesSubString:'no single'") ifTrue:[
         false ifTrue:[
-            (self confirm:(c'%1\nTry a more exhaustive search (may take long)?' bindWith:(resultArray at:1)))
+            (self confirm:(c'%1\nTry a more exhaustive search (may take long)?' 
+                            bindWith:resultArrayOrErrorString))
             ifTrue:[
                 self search2Levels.
             ]. 
         ] ifFalse:[
-            self warn:(resultArray at:1).
+            self warn:resultArrayOrErrorString.
         ].    
         ^ self
     ].
     
     "the following then replaces data1 and data2 created by the method finder to the appropriate arguments"
-    resultArray
+    resultArrayOrErrorString
         keysAndValuesDo:[:key :value |
             |newValue|
 
@@ -1183,9 +1184,9 @@
              "    newValue:= value copyReplaceString: 'data3' withString:(self messageAnswer key). "
             newValue := newValue , ' --> ' , (tempAnswer key).
             newValue replaceAll:Character cr with:Character space.
-            resultArray at:key put:newValue.
+            resultArrayOrErrorString at:key put:newValue.
         ].
-    self resultHolder value:resultArray.
+    self resultHolder value:resultArrayOrErrorString.
     resultSelectors := mf selectors.
     receiver := tempReceiver