On 2013-05-02, at 09:12, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 02 May 2013, at 06:03, Igor Stasenko <siguctua@gmail.com> wrote:
Hi, all
do not think that i am drunk or vent crazy, asking such silly question, which at best should be asked only by beginner :)
I know the answer:
Smalltalk at: #SomeName
or
Smalltalk globals at: #SomeName
what stroke me, just now, that both answers is wrong!
It should be:
#SomeName asGlobal
(or suggest more appropriate/precise method name for a symbol)
ConfigurationOfXYZ globalValue project bleedingEdge load.
ConfigurationOfXYZ globalValueIfPresent: [ :configuration | configuration project bleedingEdge load ]
An alternative could be globalBinding, but that is more technical.
#asGlobal sounds like a conversion, on the other hand it is an accepted idiom.
I would go with #asGlobal, though I'd prefer something like #asClass since I do not believe in anything but classes in SmalltalkDictionary :P, well we can add both can we :)