[BUG] MethodDictionary>>grow walkback.
Steve S
sps2000 at mail.com
Mon Aug 20 17:21:53 UTC 2001
Hi,
I was filing in the new updates when I got a walkback
MethodDictionary>>grow. The method is shown below. The problem occured
because in the first line, the species of MethodDictionary is Set. Then
when "newSelf at: key put: (array at: i)" is executed, it fails because
key is not an integer. I solved the problem enough to get through the
updates by creating the method MethodDictionary>>species that returns
MethodDictionary. But I'm not sure if this is the correct solution.
grow
| newSelf key |
newSelf _ self species new: self basicSize. "This will double the
size"
1 to: self basicSize do:
[:i | key _ self basicAt: i.
key == nil ifFalse: [newSelf at: key put: (array at: i)]].
self become: newSelf! !
More information about the Squeak-dev
mailing list
|