Set an mutable objects
Ron Teitelbaum
Ron at USMedRec.com
Tue Aug 15 15:15:46 UTC 2006
Damien,
Set>>rehash should fix your #includes: problem. I won't start the argument
about the virtues of redefining #= except to say that you must redefine
#hash also, so since you have the rest is up to you!
Ron Teitelbaum
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
> bounces at lists.squeakfoundation.org] On Behalf Of Damien Cassou
> Sent: Tuesday, August 15, 2006 11:04 AM
> To: The general-purpose Squeak developers list
> Subject: Set an mutable objects
>
> Hi,
>
> I redefined #= and #hash in one of my classes. Objects from this class
> are mutable and the hash value change when this objects change. It seems
> wrong to store mutable objects like this in a set but I can't find any
> documentation about this anywhere. Because when you add such an object
> into one Set and change the object, then the set won't find your object
> using #includes: anymore.
>
> What is allowed and what is not please ?
>
>
> Thank you
>
More information about the Squeak-dev
mailing list
|