[Seaside-dev] GROrderedMultiMap >> #keysDo:

Julian Fitzell jfitzell at gmail.com
Fri Jul 8 09:50:10 UTC 2011


My inclination is to say that it *doesn't* make sense more than it *does*
make sense, but trying to have a multi-value keyed collection implement the
dictionary protocol is bound to lead to some confusion...

On Fri, Jul 8, 2011 at 6:14 AM, Lukas Renggli <renggli at gmail.com> wrote:

> Probably depends on what you want to do. Given that #keysDo: and
> #valuesDo: is typically implemented in terms of #keysAndValuesDo: it
> kind of makes sense.
>
> Now I don't know if we depend on the current implementation of
> #keysDo: somewhere? Why not just use "keys asSet"?
>
> Lukas
>
> On 7 July 2011 21:01, Philippe Marschall <philippe.marschall at gmail.com>
> wrote:
> > Hi
> >
> > I have run into an "issue" with GROrderedMultiMap and iteration. The
> > block passed to it is evaluated for every mapping.
> >
> > given an GROrderedMultiMap
> >
> > GROrderedMultiMap new
> >  at: '1' add: 'first';
> >  at: '2' add: 'second';
> >  at: '1' add: 'third';
> >  yourself
> >
> > #keysDo: will be evaluated with '1', '2' and '1' again. I didn't
> > expect the last one. Is this the expected behavior?
> >
> >
> > Cheers
> > Philippe
> > _______________________________________________
> > seaside-dev mailing list
> > seaside-dev at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> >
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20110708/e6b35471/attachment.htm


More information about the seaside-dev mailing list