Where are system globals (Smalltalk and SystemOrganization)
Aaron Gray
angray at beeb.net
Thu Dec 9 03:29:59 UTC 2004
>>>> 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 ?
Thanks, I should have known that,
Aaron
Many thanks
More information about the Squeak-dev
mailing list
|