<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I need some kind of copyTo: functionality, which copies&nbsp;a complete object (i.e. all instance variables) to another object. I need this to "convert" an object of class A into an object of a subclass of A. Something like:</DIV>
<DIV>&nbsp;</DIV>
<DIV>Object subclass: #MyClass<BR>&nbsp;instanceVariableNames: 'var1 var2' ...</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>MyClass&nbsp;subclass: #MySubcl<BR>&nbsp;instanceVariableNames: 'var3' ...</DIV>
<DIV>&nbsp;</DIV>
<DIV>MySubcl class &gt;&gt; newCopyFrom: original</DIV>
<DIV>"create an object of class MySubcl with is - as MyClass - identical to&nbsp;original"</DIV>
<DIV>&nbsp;</DIV>
<DIV>An example of such a functionality is FormCanvas asBalloonCanvas. This method is implemented by creating a BalloonCanvas and initializing it "by hand". I am looking for a generic way&nbsp;- something like copy in Object. Any idea?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks a lot</DIV>
<DIV>Rudi</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV><p>
                <hr size=1> <a href="http://us.rd.yahoo.com/evt=34442/*http://www.yahoo.com/r/hs">Start your day with Yahoo! - make it your home page </a>