Method Finder Q?

Bob Arning arning at
Sat Jan 18 00:14:02 UTC 2003


When you type 

	'abc' . 2 . $b

into the MethodFinder, you are asking, "What method(s) exists that, when sent to the string 'abc' with the argument 2, answers the character $b?" You could also think of solving the following expression:

	('abc' x: 2) = $b

for the selector #x:.

When you typed this into the MethodFinder, you got several answers, one of them being #at:. This is because

	('abc' at: 2) = $b 

is true. When you changed something, like 'abc' to 'zzz', then #at: was no longer a valid answer

	('zzz' at: 2) = $b

is definitely false. Not only were #at: and its two variants no longer valid answers, the MethodFinder could not find any method that would be valid and that's what it was saying to you.


On Fri, 17 Jan 2003 11:41:37 -0600 Jimmie Houchin <jhouchin at> wrote:
>I am reading some in Mark's book (white).
>It's talking about the Method Finder.
>I playing with it using the example.
>The example is:
>'abc' . 2 . $b
>I accept and get similar results to the book.
>To my understanding of the above I am providing an example of a
>  'string' receiver . integer argument . character answer
>So I play with it changing the string, the integer and the character.
>Depending on how I change the string, integer, character changes the 
>Changing the 'abc' to 'zzz' gets an error.
>   While 'bbb' 'bb' 'b' works and 'aaa' 'aa' 'a' fails.
>Changing the 2 to 3 (or most anything else) gets an error.
>Changing the $b to c (or most anything else) gets an error.
>All of the above changes were done in isolation leaving other parts as 
>they were in the example.
>Error message:  No single method does that function.
>Am I misunderstanding something about the Method Finder?
>In my examples above I did not change the types of the information 
>merely small changes to content.
>Any help in understanding this is greatly appreciated.

More information about the Squeak-dev mailing list