Re: KeyedCollection in VW 9.3.1

Steffen Märcker <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.vwnc
Message-ID <[email protected]>
Intersting.

I just published two packages on the Cincom public repository:

MetaclassHierarchyFix
- Fix the metaclass hierarchy for SequenceableCollection if broken

MetaclassHierarchyFix Tests
- Tests to detect inconsistencies in the metaclass hierarchy

Have fun!
Steffen




Annick Fron schrieb am Mittwoch, 12. August 2026 22:11:10 (+02:00):

> Hi,
> 
> There was a brutal change in the hierarchy from one version to another. I flagged Cincom, but they did not react.
> It ruined my Mongodb driver …
> 
> Best regards
> 
> Annick Fron
> 
> > Le 12 août 2026 à 17:11, Steffen Märcker <[email protected]> a écrit :
> > 
> > Hi,
> > 
> > a bit more specific after some more investigation:
> > 
> > Only SequenceableCollection class does skip KeyedCollection class in method lookup / inheritance hierarchy. This means, if a method is defined in Collection class and overridden in Keyed Collection class, sending the message to SequencableCollection class will invoke the implementation in Collection instead of KeyedCollection. I have an SUnit test case to demonstrate this, if needed.
> > 
> > Kind regards,
> > Steffen
> > 
> > 
> > 
> > Steffen Märcker schrieb am Mittwoch, 12. August 2026 16:03:08 (+02:00):
> > 
> >> Hi,
> >> 
> >> I was just debugging a weird problem with a method "foo" defined in KeyedCollection class>>foo that overrides a method in Collection class>>foo. However, if I send #foo to a subclass of KeyedCollection, e.g., SequencableCollection, the implementation from KeyedCollection class is never called but always the one from Collection class. However, the browser clearly indicates that the method is indeed overridden.
> >> 
> >> After inspecting the metaclasses, I found that KeyedCollection is skipped, e.g. SequenceableCollection class inherits directly from Collection instead. All this is in a clean 9.3.1 (pul) image. Am I lost in metaclasses or is something not quiet right here?
> >> 
> >> Best, Steffen
> >> 
> > 
> > 
> > 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.