Hi,
I need some kind of copyTo: functionality, which copies 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:
Object subclass: #MyClass instanceVariableNames: 'var1 var2' ...
MyClass subclass: #MySubcl instanceVariableNames: 'var3' ...
MySubcl class >> newCopyFrom: original "create an object of class MySubcl with is - as MyClass - identical to original"
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 - something like copy in Object. Any idea?
Thanks a lot Rudi
--------------------------------- Start your day with Yahoo! - make it your home page