Method Finder Q?

Bob Arning arning at charm.net
Sat Jan 18 01:14:02 CET 2003


Jimmie,

When you type=20

	'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) =3D $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) =3D $b=20

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

	('zzz' at: 2) =3D $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.

Cheers,
Bob

On Fri, 17 Jan 2003 11:41:37 -0600 Jimmie Houchin <jhouchin at texoma.net> =
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=20
>results.
>
>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=20
>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=20
>merely small changes to content.
>
>Any help in understanding this is greatly appreciated.



More information about the Squeak-dev mailing list

Squeak-dev list courtesy of The InternetOne and tric, the new way