Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!news.duke.edu!godot.cc.duq.edu!hudson.lm.com!newsfeed.pitt.edu!dsinc!jabber!cellar!steveb
From: steveb@cellar.org (steve beuret)
Subject: Dictionary problems (newbie)
Organization: The Cellar: a friendly electronic community  (610) 539-3043
Date: Tue, 21 Mar 95 21:34:01 EST
Message-ID: <eNFc3c3w164w@cellar.org>
Sender: bbs@cellar.org (BBS user account)
Lines: 17

I'm trying to represent some data using a subclass of OrderedCollection, and
nesting them inside each other.  A MyClass object has a name and a few other
things and contains other MyClass objects.  

I want to use a dictionary to keep keep track of the nesting.  Each time a
MyClass object adds something to its collection, it makes an entry in a
dictionary using the new item as the key and itself as the value.  The idea
is to be able to find out what object an item is contained in by looking
the object up in the dictionary.  I _seem_ to be updating the dictionary
correctly, but when I inspect it there are missing values etc. 

If there's a better way to do this nesting, I'm all ears!

Thanks, SB

                -- Steve Beuret -- steveb@cellar.org
                   "I read the news today oh boy."
