[squeak-dev] object header and class name
Bert Freudenberg
bert at freudenbergs.de
Thu Aug 13 07:46:24 UTC 2009
On 13.08.2009, at 09:08, Ang Beepeng wrote:
>
> Hi.
>
> We can know which class is an object from the object header. But how
> can we
> know what is the class name of that class? By this I mean only with
> object
> pointer.
It's the 7th instance variable in the class. So
self fetchPointer: 6 ofObject: aClass.
See, for example, Interpreter>>classNameOf:Is:.
- Bert -
More information about the Squeak-dev
mailing list
|