OrderedCollection>>copyWithAll:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OrderedCollection>>copyWithAll:

NorbertHartl
Hi,

OrderedCollection>>copyWithAll: does not work.

(OrderedCollection with: 1 with: 2) copyWithAll: {3 . 4 . 5 }

throws an error. It uses replaceFrom:to:with: which tries
to operate on non-existing indexes. copyWithAll: is just
used at two places

MADistribution>>addPostscript:
and
MADistribution>>addPreamble:

These make use of Collection>>copyWithAll: which works for
String objects. OrderedCollection>>copyWithAll: is never
used.

So it isn't that important and might be better removed

regards,

Norbert


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: OrderedCollection>>copyWithAll:

Lukas Renggli-2
I added another test and fixed this issue in Magritte-All-lr.231. I  
moved the method from SequenceableCollection to ArrayedCollection as  
it is used in Pier and some other projects.

Thanks for reporting.

Lukas

On 26.07.2007, at 11:14, Norbert Hartl wrote:

> Hi,
>
> OrderedCollection>>copyWithAll: does not work.
>
> (OrderedCollection with: 1 with: 2) copyWithAll: {3 . 4 . 5 }
>
> throws an error. It uses replaceFrom:to:with: which tries
> to operate on non-existing indexes. copyWithAll: is just
> used at two places
>
> MADistribution>>addPostscript:
> and
> MADistribution>>addPreamble:
>
> These make use of Collection>>copyWithAll: which works for
> String objects. OrderedCollection>>copyWithAll: is never
> used.
>
> So it isn't that important and might be better removed
>
> regards,
>
> Norbert
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

smime.p7s (5K) Download Attachment