[Cuis-dev] My OrderedWeakKeyDictionary isn't growing properly

rabbit rabbit at callistohouse.org
Mon Mar 13 10:50:01 PDT 2023


I made a little progress implementing a #grow method, but it's bugging out on access after grow,.. sigh. Your thoughts?

> | set |
> set := OrderedWeakIdentityKeyDictionary new.
> 1 to: 10 do: [:i |
> self assert: ((set findElementOrNil: (set keyAtValue: (set add: (i -> Object new)) value)) > 0)].

grazie,
🐰

On 3/13/23 13:11, rabbit via Cuis-dev wrote:

> Hey everyone, I'm trying to port my OrderedWeakKeyDictionary from Squeak's HashedCollection to Cuis' Set based Dictionary superclass. I've got a growTo: but Set>>#grow doesn't call it.
>
>> | set |
>> set := OrderedWeakIdentityKeyDictionary new.
>> 1 to: 10 do: [:i |
>> self assert: ((set findElementOrNil: (set add: (i -> Object new))) >
>
> grazie alla tua provvidenza,
> rabbit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/b7d7b823/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OrderedWeakIdentityKeyDictionary.st
Type: application/vnd.sailingtracker.track
Size: 7248 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/b7d7b823/attachment.bin>


More information about the Cuis-dev mailing list