Hi !
Actually it is probably a very simple Squeak concept which I haven't 
understood, yet.

Serving as an simple example, I would like to write a method, which accepts a 
Class as argument and which return the Superclass of that Class.
The problem is that the argument must be an instance of String, that means  the 
argument aClassName  contains an actual class name (e.g. aClassName = 'Object'. 
or aClassName = 'ClassBuilder'), however, this is just a String object.

returnSuperClass: aClassName
|aSuperClass|

aSuperClass := aClassName superclass.

^ aSuperClass.

Obviously this method won't work, because aClassName is just an instance of 
ByteString. And instances of ByteString cannot understand the message 
superclass.

So I need the actual class object  which the content of the String aClassName 
represents.
How can I achieve ? Or how can I make this method correct ?
(it is imperative, that the argument aClassName is a String).

Thanks for you help in advance.


Best Regards
Warakorn


 
---------------------------------
Have a burning question? Go to Yahoo! Answers and get answers from real people 
who know.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to