[Seaside] Re: asSet asOrderedCollection

mbreitha max at bouh.org
Thu May 18 15:48:26 UTC 2006

On 5/18/06, mbreitha <max at bouh.org> wrote:
> Hello,
> I would like to know if is possible to delete doubledbloom in an
> orederedCollection when it's composed by Objects. I've tried with asSet
> but it doesn't work with Objects.
> thanks for your answer
What kind of objects are you trying to condense in a Set?

If they are your domain objects, check the implementation of #= and
#hash. (Look for other implementator to understand its behavior).

As a rule of thumb I recommend you that each time you implement #= in
your object also implement #hash using the same criteria.

Perhaps your problem is that your objects doesn't implement the method
with selector #= (nor #hash).

To play with, instance two of your objects and compare them using:
objectA = objectB
objectA hash = objectB hash

If both are equal, those evaluations must answer true.

My objects are:
Fait new boolean:#red.
Fait new boolean:#red.

I have done the two evaluations and with : Fait new boolean:#red = Fait
new boolean:#red, I get True.
Also, if I do the evaluation with hash, the result is False.
I don't understand ????

my fonction = is:
= aFait
^self boolean = aFait boolean

More information about the Seaside mailing list