Doh! Sorry, didn't read carefully (or the whole thread).

Bert is right:
Smalltalk classNamed: 'Object'

On 1/16/07, David Mitchell <[EMAIL PROTECTED]> wrote:
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 := (Smalltalk classNamed: aClassName) superclass.
>
> ^ aSuperClass.
>

And now the one liner:
^(Smalltalk classNamed: aClassName) superclass.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to