Re: KeyedCollection in VW 9.3.1

Steffen Märcker <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.vwnc
Message-ID <[email protected]>
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.