[new to smalltalk] what does this error want to tell me?

Dan Ingalls Dan at SqueakLand.org
Thu Dec 9 17:48:24 UTC 2004


[in reply to  Ingo Hohmann <iho at gmx.de> ]

Hi, Ingo -

Thanks for taking an interest.

>Dan Ingalls wrote:
>>>Hello folks,
><...>
>>[System Maintainers: This used to be, and should be, simply
>>ObsoleteNameIUsedToBe.  If anyone is bored, this should be fixed.
>>Right now instances print as "an AnObsoleteNameIUsedToBe" which is a
>>little tacky]
><...>
>
>How I start to tackle this? My first idea was to use "find message bodys with 'AnObsolete'", which showed 8 messages who seem to be related to this.
>
>Is there reason to believe, that this is it, or would I have to dig deeper?

You'll also want to look for 'AnOb*' ;-)

>Another thing to think about, if this is changed in an image _containing_ obsolete classes, could there be negative sideeffects?

I think you'll want to...

1.  Fix Smalltalk obsoleteClasses so that it checks isObsolete as well.

2.  Then collect Smalltalk obsoleteClasses at the beginning of the change,
	and change their names

3. Then change all the methods.

4.  Since you are doing all this, it would help to have a single method like

	<ClassDescription>obsoleteClassNamePrefix
		^  'Obsolete'

5.  it would be nice to include a clear comment somewhere (like in Smalltalk obsoleteClasses) about how one can come to have obsolete instances and classes, and what to do about it.

Finally, the print method could produce something like
	an ObsoleteGruber -- see comment in Smalltalk obsoleteClasses
but this might be hard to do without complicating the print logic, or adding a method to what is now a nice simple stub.  [Write me offline if you get into this]

>How about there being any valid classes named ObsoleteSomthing in an image?

I don't think these will be confused if the isObsolete check is included.

>Thanks for your advice.
>(Well, not exactly bored, but starting to learn.)

Good luck.

	- Dan



More information about the Squeak-dev mailing list