<html><div style='background-color:'><DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm having a problem with Squeak that I can't explain or resolve.&nbsp; The problem is that it created a class dynamically (which I didn't want), while I was trying to instantiate objects from another class.&nbsp; Now all attempts to&nbsp;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:&nbsp; 'new: aString' that through a superclass's initialize method&nbsp;assigned the value of aString to an inst var called 'name'.&nbsp; </DIV>
<DIV>&nbsp;</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.&nbsp; 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.&nbsp; The code for new: is simply </DIV>
<DIV>new: aString</DIV>
<DIV>&nbsp; ^ super new: aString initialize.</DIV>
<DIV>&nbsp;</DIV>
<DIV>the code for initialize is </DIV>
<DIV>&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>Because&nbsp;my&nbsp;Smalltalk is rusty, I may have originally made some syntactical errors in the method's implementation.&nbsp;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</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>