[squeak-dev] How do I replace a call SmalltalkImage>>associationAt:ifAbsent:? (Environments)
hannes.hirzel at gmail.com
Mon Oct 9 17:56:40 UTC 2017
Squeak 6.0a trunk image.
With fix EToys-hjh.308.mcz loaded (please commit it to trunk)
The I dropped an Etoys example pr project file from
onto the desktop.
Unfortunately I do not recall the details which action caused the
walkback window with the
problem to appear.
I'll report later if it occurs again.
On 10/9/17, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> On Mon, 9 Oct 2017, H. Hirzel wrote:
>> How do I replace a call SmalltalkImage>>associationAt:ifAbsent:?
> What image do you use? The receiver of #associationAt:ifAbsent: must not
> be a SmalltalkImage but an Environment.
>> | assoc |
>> assoc := self environment associationAt: cue getClass name ifAbsent:
>> ^assoc value == cue getClass
>> ifTrue: [assoc]
>> ifFalse: [Association new value: cue getClass]
>> SmalltalkImage>>associationAt: key ifAbsent: aBlock
>> self deprecated: 'Use Smalltalk globals'.
>> ^globals associationAt: key ifAbsent: aBlock
>> A direct replacement does not work.
>> Kind regards
More information about the Squeak-dev