This doesn't work either, because again (Smalltalk at: aClassName) is returning just a ByteString but not (e.g.) Object class or (e.g.) ClassBuilder class .<br><br>Lets assume in the calling method is written:<br>returnSuperClass: '#Object'.<br>Note: the Argument must be an instance of String.<br><br>returnSuperClass: aClassName<br>|aSuperClass|<br><br>aSuperClass := (Smalltalk at: aClassName) superclass.<br><br>^ aSuperClass.<br><br>Nope, this does'nt work.<br><br><b><i>Herbert König <herbertkoenig@gmx.net></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hello Warakorn,<br><br>try:<br>Smalltalk at: #MonthMorph inspect<br><br>Cheers<br><br>Herbert mailto:herbertkoenig@gmx.net<br>WP> Hi !<br>WP> Actually it is probably a very simple Squeak concept which I haven't understood, yet.<br><br>WP> Serving as an simple example, I would
like to write a method,<br>WP> which accepts a Class as argument and which return the Superclass<br>WP> of that Class.<br>WP> The problem is that the argument must be an instance of<br>WP> String, that means the argument aClassName contains an actual<br>WP> class name (e.g. aClassName = 'Object'. or aClassName =<br>WP> 'ClassBuilder'), however, this is just a String object.<br><br>WP> returnSuperClass: aClassName<br>WP> |aSuperClass|<br><br>WP> aSuperClass := aClassName superclass.<br><br>WP> ^ aSuperClass.<br><br>WP> Obviously this method won't work, because aClassName is just<br>WP> an instance of ByteString. And instances of ByteString cannot<br>WP> understand the message superclass.<br><br>WP> So I need the actual class object which the content of the String aClassName represents.<br>WP> How can I achieve ? Or how can I make this method correct ?<br>WP> (it is imperative, that the argument aClassName is
a String).<br><br>WP> Thanks for you help in advance.<br><br><br>WP> Best Regards<br>WP> Warakorn<br><br><br><br>WP> Have a burning question? Go to Yahoo! Answers and get answers from real people who know.<br><br><br><br><br>_______________________________________________<br>Beginners mailing list<br>Beginners@lists.squeakfoundation.org<br>http://lists.squeakfoundation.org/mailman/listinfo/beginners<br></blockquote><br><p> 
<hr size=1>
Don't get soaked. Take a<a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news"> quick peak at the forecast </a><br> with the<a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news">Yahoo! Search weather shortcut.</a>