[squeak-dev] The Trunk: Graphics-mt.430.mcz
Jakob Reschke
forums.jakob at resfarm.de
Wed Apr 22 07:48:03 UTC 2020
Am Di., 21. Apr. 2020 um 12:37 Uhr schrieb Marcel Taeumel
<marcel.taeumel at hpi.de>:
>
> > Note that "Smalltalk classNamed: ..." is not Environments-friendly
>
> Good to know! What to use instead?
>
1. If you want to do the lookup in the same environment as the
receiver class (like referring to the class directly, but not resolved
at compile time):
self class environment classNamed: ...
2. If you want to do the lookup in the context-dependent environment
(supplied on the stack, cannot be done by referring to the class
directly):
Environment current classNamed: ....
Here, option 1 is probably the way to go.
More information about the Squeak-dev
mailing list
|