[FIX] OrderedCollection

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Thu May 18 16:26:34 UTC 2000


On Thu, 18 May 2000, Stephan Rudlof wrote:

> I think #collect:from:to: is a fix of a bug in the superclass version of
> SequenceableCollection (think of starting collecting *not* with first
> index).
> Shouldn't it replace this method in SequenceableCollection instead of
> overriding it?
> 
> What was the problem for #withIndexCollect:?

Both methods had the same problem. The SequenceableCollection
implementation assumes that after "class new: size" it can use #at:put: to
add elements. This is only true for ArrayedCollections, not for OCs. So
you may be right and this might need to get fixed elsewhere.

-- Bert





More information about the Squeak-dev mailing list