WeakAssociation
Gerardo Richarte
gera at core-sdi.com
Fri Jan 15 20:00:12 UTC 1999
Hi!
I'm working with Weak things, and I'm trying to use a
WeakValueDictionary as bindings for a WrapperWorldMorph, I have a
problem that I would think it's not easily solvable, but DanI will not
let me think so... here is the problem (I'm extrapolating everything I
don't know):
When the interpreter needs a binding for some name, it asks
#bindingsOf: and it expects an association as answer, as I'm using a
WeakValueDictionary as bindings, the association it answers is a
WeakValueAssociation which has a WeakArray of size 1 as value, with the
real value as it single element.
#value method is redefined correctly to answer 'value at: 1', so
WeakValueAssociations can be interchanged with standard Associations
always, except when they aren't accessed from Squeak, as from the
compiled interpreter. (I said so, because if I step through code
everything works fine)...
Ok... is there a solution for this?
Should be there a solution for this?
shouldn't all bindings be WeakValueDictionaries instead of
Dictionaries?
shouldn't Symbol's symbols tables be also WeakArrays, and rehashing
made automatically?
did you notice that I'm using a spell checker? (-:
does anybody have a grammar checker? )-:
UnWeak (strong?) Bye!
Richie++
More information about the Squeak-dev
mailing list
|