Where are system globals (Smalltalk and SystemOrganization)

Yar Hwee Boon hboon at motionobj.com
Thu Dec 9 03:47:59 UTC 2004


On Thu, 9 Dec 2004 03:29:59 -0000, Aaron Gray <angray at beeb.net> wrote:

>>>>> The main problem I seem to have with looking at code is seeing what  
>>>>> class certain methods are for example in :-
>>>>>
>>>>> (Smalltalk reject: [:item | item class isMeta ])
>>>>>   associationsDo: [:assoc  | Transcript show: assoc key printString;  
>>>>> cr].
>>>>>
>>>>> What class is key, if I look at Association I see key returns a key,  
>>>>> but what class is that key that printString is being applied to ?
>>>>> I find this same problem over and over, is there a simple solution ?  
>>>>> I may have been given the answer at somepoint but cannot remember.
>>>>
>>>> You can put a self halt before the "Transcript show" to find out.
>>>
>>> Err, tried it, but cannot see how ?
>>
>> Click debug, then inspect assoc (or assoc key) from the debugger.  
>> Inspectors show the class of the object it is looking at in the window  
>> title bar. Explorers don't.
>
> Ah.
>
> The key is a Symbol.
>
> So you have to run the code to find that out. And there is no other  
> simple way ?

Class comments might describe this, but in this case it seems not.  
Actually, I've found it more convenient to actually find out information  
like this either through sending #class to an instance or viewing it in an  
inspector, ie. like you say, through code. Not sure how the others do it  
though.

> Thanks, I should have known that,

Remember, its a great environment for exploration, running code should be  
fun :)

-- 
Regards
HweeBoon
MotionObj



More information about the Squeak-dev mailing list