comparing objects in a collection

goran.hultgren at goran.hultgren at
Mon Feb 3 10:22:54 UTC 2003

Hi Janet!

I just replied to your first post and then saw this followup. 

Janet Abdul-Karim <jn_karim at> wrote:
> I am understanding what you said about the difference between #= and #==, but I still get the same result. I am wondering is my logic somehow work or could I possibly be missing some type of punctuation because I know the object is there but it seems to always evaluate the false part and then prints out the type of the object that i am looking for.

I think that if you look closely in Transcript it shows *for each
element* in the collection either the element or the "No such account
exists..." string.

So if the collection contains three instances of Account and you search
for the one with number 3 (lets say the last one added) it would
probably show something like this in Transcript:

No such account exists in this portfolio
No such account exists in this portfolio
an Account

...or something like that. One line for each element.

regards, Göran

More information about the Squeak-dev mailing list