I took a look at what would be needed to port the Cuis Trie to Pharo.
Trie is a subclass of Collection, and expects at: aKey, not at: anIndex. That breaks the EyeInspector view. What interface expects the explorer a Collection subclass to have? Stephan |
I have mentioned this before, but EyeCollectionInspector is actually written against SequenceableCollection since it expects ordered external integer indexing. That is why currently every Collection subclass without this protocol and/or without a custom inspector fails.
The alternative would be to move Collection class>>#inspectorClass to SequenceableCollection>>#inspectorClass. Then Collection subclasses that are not SequenceableCollection and that do not have a custom inspector will fail. Note that fail means a fall back to EyeBasicInspector. On 25 Jul 2014, at 12:32, Stephan Eggermont <[hidden email]> wrote: > I took a look at what would be needed to port the Cuis Trie to Pharo. > Trie is a subclass of Collection, and expects at: aKey, not at: anIndex. > That breaks the EyeInspector view. What interface expects the > explorer a Collection subclass to have? > > Stephan > |
On 25 Jul 2014, at 12:39, Sven Van Caekenberghe <[hidden email]> wrote: > I have mentioned this before, but EyeCollectionInspector is actually written against SequenceableCollection since it expects ordered external integer indexing. That is why currently every Collection subclass without this protocol and/or without a custom inspector fails. > > The alternative would be to move Collection class>>#inspectorClass to SequenceableCollection>>#inspectorClass. Then Collection subclasses that are not SequenceableCollection and that do not have a custom inspector will fail. > > Note that fail means a fall back to EyeBasicInspector. > I did that change in 4.0 (with the mistake of putting #inspectorClass on the instance side of SequenceableCollection, I will fix that soon) Marcus |
On 25 Jul 2014, at 12:55, Marcus Denker <[hidden email]> wrote: > > On 25 Jul 2014, at 12:39, Sven Van Caekenberghe <[hidden email]> wrote: > >> I have mentioned this before, but EyeCollectionInspector is actually written against SequenceableCollection since it expects ordered external integer indexing. That is why currently every Collection subclass without this protocol and/or without a custom inspector fails. >> >> The alternative would be to move Collection class>>#inspectorClass to SequenceableCollection>>#inspectorClass. Then Collection subclasses that are not SequenceableCollection and that do not have a custom inspector will fail. >> >> Note that fail means a fall back to EyeBasicInspector. >> > > I did that change in 4.0 (with the mistake of putting #inspectorClass on the instance side of SequenceableCollection, I will fix that soon) > > Marcus Ah, OK. Yes it is class side (I made a typo too). Don't forget to remove the selector from Collection. |
In reply to this post by Marcus Denker-4
Marcus Denker wrote:
On 25 Jul 2014, at 12:39, Sven Van Caekenberghe [hidden email] wrote:I have mentioned this before, but EyeCollectionInspector is actually written against SequenceableCollection since it expects ordered external integer indexing. That is why currently every Collection subclass without this protocol and/or without a custom inspector fails. The alternative would be to move Collection class>>#inspectorClass to SequenceableCollection>>#inspectorClass. Then Collection subclasses that are not SequenceableCollection and that do not have a custom inspector will fail. Note that fail means a fall back to EyeBasicInspector.I did that change in 4.0 (with the mistake of putting #inspectorClass on the instance side of SequenceableCollection, I will fix that soon) Marcus So EyeCollectionInspector should be called EyeSequenceableCollectionInspector ? |
On 25 Jul 2014, at 13:03, Ben Coman <[hidden email]> wrote:
yes… if it only works for those it needs to make it clear. Marcus
|
In reply to this post by Stephan Eggermont-3
Ok, thanks, that makes thing clear.
Stephan |
In reply to this post by Stephan Eggermont-3
There are several implementation of trie. Benoit St jean did another one
and he told me that it was simpler and faster. I have it around and I can send it to you if you need. I was slowly going to add them to a project where I collect on collections implementation Stef On 25/7/14 12:32, Stephan Eggermont wrote: > I took a look at what would be needed to port the Cuis Trie to Pharo. > Trie is a subclass of Collection, and expects at: aKey, not at: anIndex. > That breaks the EyeInspector view. What interface expects the > explorer a Collection subclass to have? > > Stephan > > |
In reply to this post by Stephan Eggermont-3
In StephaneDucasse/PetitsBazars
package Box and BoxTests contains an alternate implementation you could add the one of cuis so that we can compare. BXTrie is a work under progress. Stef > I took a look at what would be needed to port the Cuis Trie to Pharo. > Trie is a subclass of Collection, and expects at: aKey, not at: anIndex. > That breaks the EyeInspector view. What interface expects the > explorer a Collection subclass to have? > > Stephan > > |
Free forum by Nabble | Edit this page |