[Glass] [3.1.0.4] Set>>deepCopy
Richard Sargent
richard.sargent at gemtalksystems.com
Thu Jul 18 10:10:00 PDT 2013
Hi Ken,
It's not a bad approach, especially for a non-vendor solution. Overall, it
would be better to model this solution after
AbstractDictionary>>#_deepCopyWith:, changing only the last portion that
iterates through the collection elements.
I have reported this defect in our bug tracker.
On Wed, Jul 17, 2013 at 11:12 PM, Ken Treis <ken at miriamtech.com> wrote:
> In 3.1.0.4:
>
> (Set with: 1) deepCopy
>
>
> … gives me an empty Set. I have worked around it by adding the following
> method to Set:
>
> *deepCopyWith: copies*
> | copy |
> copy := copies at: self otherwise: nil.
> copy ifNotNil: [^copy].
> copy := self class new.
> copies at: self put: copy.
> self do: [:each | copy add: (each _deepCopyWith: copies)].
> ^ copy
>
>
> Doubtless it's the wrong way to do it, but it got my tests passing.
>
> --
> Ken Treis
> Miriam Technologies, Inc.
> (866) 652-2040 x221
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
--
Richard Sargent
Business Development Manager
richard.sargent at gemtalksystems.comGemTalk Systems
15220 NW Greenbrier Parkway #240
Beaverton, OR 97006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20130718/bb2896ee/attachment.html>
More information about the Glass
mailing list