<html><div style='background-color:'><DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I'm having a problem with Squeak that I can't explain or resolve. The problem is that it created a class dynamically (which I didn't want), while I was trying to instantiate objects from another class. Now all attempts to message objects of the real class are routed to the 'fake' class.<BR></DIV>
<DIV>Here's the basic scenario:</DIV>
<DIV>I had a class called MyBuilding with a constructor: 'new: aString' that through a superclass's initialize method assigned the value of aString to an inst var called 'name'. </DIV>
<DIV> </DIV>
<DIV>When I tried to instantiate using 'x := MyBuilding new: 'house', the system created a class called 'house' with the class name as the string rather than a usual symbol. All attempts since that time to instantiate MyBuilding result in its initialize method being sent to the class 'house' rather than an instance of My Building. The code for new: is simply </DIV>
<DIV>new: aString</DIV>
<DIV> ^ super new: aString initialize.</DIV>
<DIV> </DIV>
<DIV>the code for initialize is </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Because my Smalltalk is rusty, I may have originally made some syntactical errors in the method's implementation. </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>My Smalltalk is very rusty, but I used to do it for a living and I'm completely perplexed.</DIV></div><br clear=all><hr>Join the world’s largest e-mail service with MSN Hotmail. <a href='http://g.msn.com/1HM1ENUS/c157??PI=44364'>Click Here</a><br></html>