2 references to class with the same name

Roel Wuyts Roel.Wuyts at ulb.ac.be
Mon Mar 5 09:04:59 UTC 2007


Shooting wildly without having had time to look at it: another  
culprit *could be* the SystemChangeNotification.

  I fixed a number of problems with this a while ago which should be  
in 3.9 (haven't yet checked whether they went into the image  
actually). There was a problem with (obsolete) classes being passed  
as part of a remove-class notification. This is fixed now, but this  
post reminded me about this.

Who knows, maybe the image you are using is a bit older, or the fix  
was not accepted, or there is another bug remaining, or it is  
something else :-) So this post is just to point at another place to  
take into consideration.

Is your changes file very big ? If not you could have a look at what  
you did with these classes (e.g. did you add methods to them ?  
Renamed them? Moved them between packages ? etc. that could give a  
hint...

On 27 Feb 2007, at 27 February/10:43, Gary Chambers wrote:

> Me too, a few weeks ago. Very odd to see it for the first time!
> Like Brad, only one method different between the two.
>
>> -----Original Message-----
>> From: squeak-dev-bounces at lists.squeakfoundation.org
>> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of  
>> Bert
>> Freudenberg
>> Sent: 26 February 2007 8:47 PM
>> To: The general-purpose Squeak developers list
>> Subject: Re: 2 references to class with the same name
>>
>>
>>
>> On Feb 26, 2007, at 20:46 , Brad Fuller wrote:
>>
>>> I searched for the answer to this, but mostly found how to deal
>>> with instances and obsolete classes. Somehow, I ended up with 2 two
>>> classes with the same name, and the class is not obsolete.
>>>
>>> If I look at the hierarchy of it's (their) superclass
>>> (PRStructuresWidget)  there are two classes shown:
>>>
>>> 	PRSearchWidget #('searchText' 'items')
>>> 	PRSearchWidget #('searchText')
>>>
>>> PRSearchWidget #('searchText' 'items') is the current "real" class.
>>> Somehow PRSearchWidget #('searchText') got in there, which I don't
>>> want. I don't know how to get rid of it. Anyone point me to the
>>> right documentation on this?  Maybe if I file out the current one,
>>> then remove the class?
>>
>> Funny you should mention this. I saw the same thing in about three
>> images lately. I have no idea where it comes from. My hunch is
>> Monticello, but I have no evidence to back this up.
>>
>> In all cases I found that one or even two older version of a class
>> were still in the subclasses list of its superclass. That is, in the
>> browser you could see several subclasses with the same name. Only one
>> of these is the "real" one which is also registered in Smalltalk.
>>
>> I do not hava a bad image now, but to find these, the following
>> should work:
>>
>> bad := OrderedCollection new.
>> Smalltalk allClassesDo: [:ea | bad addAll: (ea subclasses reject:
>> [:cls | cls isMeta or: [cls == (Smalltalk at: cls name)]])].
>> bad
>>
>> To remove them, try this:
>>
>> bad do: [:cls | cls superclass removeSubclass: cls]
>>
>> Hmm, has anybody else seen this?
>>
>> - Bert -
>>
>>
>>
>>
>




More information about the Squeak-dev mailing list