[Newbies] How to access a Squeak class

David Mitchell david.mitchell at gmail.com
Tue Jan 16 19:14:09 UTC 2007


The method Object>>#class does what you want. Since it is defined on
Object you can send the message to any object, including a string.

> returnSuperClass: aClassName
> |aSuperClass|
>
> aSuperClass := aClassName class superclass.
>
> ^ aSuperClass.
>

The above method body could be a one liner:
^aClassName class superclass


More information about the Beginners mailing list