Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!howland.reston.ans.net!news.nic.surfnet.nl!rug.nl!root
From: R.W.Vens@bdk.rug.nl (Rob Vens)
Subject: Re: Problem with VW 2.0 instanceVariableNames
Message-ID: <DAvu6p.3vK@rug.nl>
Sender: root@rug.nl (Operator)
Nntp-Posting-Host: pc-bdk64.bdk.rug.nl
Organization: Sepher Software
X-Newsreader: WinVN 0.93.14
References: <19950622.154734.888278.NETNEWS@AUVM.AMERICAN.EDU>
Mime-Version: 1.0
Date: Wed, 28 Jun 1995 12:18:24 GMT
Lines: 38

In article <19950622.154734.888278.NETNEWS@AUVM.AMERICAN.EDU>, 
Mario.Koeppen@IPK.FHG.D400.DE says...
>
>Concerning the following problem:
>
>***************** included text follows ******************************
>When I try to create a subclass of Dictionary or OrderedCollection
>with some instance variables, it does not work.
>
>Example:
>        Dictionary subclass: #MyDic
>        instanceVariableName: 'info'
>        classVariableNames: ''
>        poolDictionaries: ''
>        category: 'myCat'
>
>        |aMyDic|
>        aMyDic := MyDic new.
>
>then inspecting aMyDic shows no instance variable. (There is also no
>access by any method defined in MyDic).
>
>Are ther any explanations for this ?
>
>Birgit
>birgit.lemken@fernuni-hagen.de
>**************** end of included text***********************************
>

Hi Mario, nice to see you alive..!
Concerning adding named instance variables to Dictionary subclasses, 
other problems may occur. This is due to the fact that Dictionary 
implements adding key-values to it by using the grow operation, which in 
turn uses become: to swap the references.
You may need to override Dictionary>>grow to copy the named instance 
variables into the new object before it is swapped.


