remove: and GOODS -- identity problems?

Sebastian Sastre ssastre at seaswork.com.ar
Tue Jul 6 17:56:16 UTC 2004


What about replacing Sets with TreeSets ?

Regards,

Sebastián Sastre
ssastre at seaswork.com.ar
www.seaswork.com.ar

Sebastián Sastre
ssastre at seaswork.com.ar
www.seaswork.com.ar


> -----Mensaje original-----
> De: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] En 
> nombre de Ragnar Hojland Espinosa
> Enviado el: Martes, 06 de Julio de 2004 10:26
> Para: squeak-dev at lists.squeakfoundation.org
> Asunto: remove: and GOODS -- identity problems?
> 
> 
> I have anObj inside aSet that I pull out of GOODS, and that I 
> want to remove.
> 
> 	aSet remove: anObj 
> 
> This fails with Error: Object is not in the collection.
> 
> This:
> 
>      detected _ aSet detect: [:each | each = anObj ]
>      aSet remove: detected.
> 
> does detect it (also with ==) but remove: fails too.
> 
> This:
> 
>      aSet _ aSet select: [:each | each ~= anObj ]
> 
> works.
> 
> Why is remove: complaining?
> -- 
> Ragnar Hojland - Project Manager
> Linalco "Specialists in Linux and Free Software" 
http://www.linalco.com  Tel: +34-91-4561700






More information about the Squeak-dev mailing list