[Q] What Collection should I use
torge.husfeldt at gmx.de
Thu Apr 3 17:04:49 UTC 2003
On Thu, 03 Apr 2003 18:48:24 +0200, Chris Burkert
<christian.burkert at s2000.tu-chemnitz.de> wrote:
What is wron with two dictionaries:
key -> obj
obj -> Boolean (enabled)
> I have to remember some Objects. Each of them is referenced by a key. The
> Objects can be 'enabled' or 'disabled' but they shouldn't know about this
> state, nor about the key, so I didn't want to put this information inside
> of the objects. My wish is like swapping objects in and out.
> First I thought of having two Collections, one with the enabled objects
> and one with the disabled.
> Then I thought of putting all objects in one Dictionary and access them
> by two MappedCollections of enabled and disabled objects but AFAIK those
> MappedCollections cannot grow or shrink.
> Do you have a good idea? Is there a fast way of swapping and accessing
> Chris Burkert
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
More information about the Squeak-dev