help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: [bug] MappedCollection >> #keysDo: does not work as


From: nicolas cellier
Subject: [Help-smalltalk] Re: [bug] MappedCollection >> #keysDo: does not work as expected
Date: Tue, 01 Jul 2008 22:09:58 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

Sam Phillips a écrit :
Issue status update for http://smalltalk.gnu.org/node/231
Post a follow up: http://smalltalk.gnu.org/project/comments/add/231

Project:      GNU Smalltalk
Version:      <none>
Component:    Base classes
Category:     bug reports
Priority:     normal
Assigned to:  Unassigned
Reported by:  sdp
Updated by:   sdp
Status:       active

I'm uncertain if this is the proper behavior for this or not, but when
you perform #keysDo: on a MappedCollection you get the mapped key
values
which are different from the response from #keys.

Example:


st> d := Dictionary from: { #aaa -> 1. #bbb -> 2. #ccc -> 4}
Dictionary (
       #aaa->1
       #bbb->2
       #ccc->4
)
st> m := MappedCollection collection: (Array new: 4) map: d
MappedCollection (nil nil nil )
st> m keys
Set (#aaa #bbb #ccc )
st> m keysDo: [:k | k displayNl ]
1
2
4
MappedCollection (nil nil nil )

I would expect (m keysDo: ) to behave as (m keys do: )





reply via email to

[Prev in Thread] Current Thread [Next in Thread]