#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 05 May 2016 10:59:55 +0200
changeset 4025 3e0c6dd0ad9e
parent 4021 43053b6b0786
child 4026 2d9b8d100559
#FEATURE by cg class: MethodFinder removed: #methodFor: comment/format in: #cleanInputs: changed: #testPerfect: care for obsolete methods
MethodFinder.st
--- a/MethodFinder.st	Wed May 04 21:12:19 2016 +0200
+++ b/MethodFinder.st	Thu May 05 10:59:55 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
@@ -108,34 +106,6 @@
     Dangerous := something.
 ! !
 
-!MethodFinder class methodsFor:'as yet unclassified'!
-
-methodFor: dataAndAnswers
-    "Return a Squeak expression that computes these answers.  
-     (This method is called by the comment in the bottom pane of a MethodFinder.  
-     Do not delete this method.)"
-
-"/ but yes, I do !!
-"/ the finder already shows all the implementors in the right pane;
-"/ no need fr this.
-
-"/    | resultOC selFinder resultString |
-"/   
-"/    resultOC _ (self new) load: dataAndAnswers; findMessage.
-"/    resultString _ String streamContents: [:strm |
-"/            resultOC do: [:exp | strm nextPut: $(; nextPutAll: exp; nextPut: $); space]].
-"/
-"/    Smalltalk isMorphic ifTrue: [
-"/            selFinder _ (Display bestGuessOfCurrentWorld 
-"/                            submorphThat: [:mm | 
-"/                                            mm class == SystemWindow 
-"/                                            and: [mm model isKindOf: SelectorBrowser]] 
-"/                            ifNone: [^ resultString]) model.
-"/            selFinder searchResult: resultOC].
-"/
-"/    ^ resultString
-! !
-
 !MethodFinder methodsFor:'accessing'!
 
 answers
@@ -347,6 +317,9 @@
     |fixed ddd rs places|
 
     ddd := dataAndAnswerString.
+    
+    "/ check if user typed #true / #false instead of true / false
+    
     fixed := false.
     rs := ReadStream on:ddd , ' '.
     places := OrderedCollection new.
@@ -379,6 +352,9 @@
             information:'#(true false) are Symbols, not Booleans.  
 Next time use { true. false }.'
     ].
+    
+    "/ check if user typed #nil instead of nil
+
     fixed := false.
     rs := ReadStream on:ddd.
     places := OrderedCollection new.
@@ -1565,8 +1541,11 @@
                 ] ifError:[ self halt. ]
             ].
         expectedAnswer := (answers at:ii).
-        val := [
-                rec copy perform:aSelector withArguments:argList
+        val := 
+            [
+                [
+                    rec copy perform:aSelector withArguments:argList
+                ] on:ObsoleteMethodCallWarning do:[^ false].    
             ] ifError:[:aSignal | 
                 "/ Transcript showCR:aSignal description.
                 "self test3."