>>How about using the class browser and opening the class. Select the view class code and select the code for a copy paste.
>
>But I need to re-create the properties (with their comments) and methods (with their comments) I added to the class. I don't see how Class Browser is going to help me. I would see all methods and properties, but I still have to add them somehow.
Ok, here's what I did for this before I started writing builders. Actually, this is a way of lightweight builder.
Edit both classes at the same time. Use aselobj() to get references to each, say oOld and oNew. Then have two routines:
procedure CopyProperty(o1, o2, cProperty)
o2.addproperty(cProperty, eval("o1."+cproperty))
procedure copyMethod(o1, o2, cMethod)
o2.writemethod(cMethod, o1.readmethod(cmethod), .t.)
Now just
copyproperty(oOld, oNew, "backcolor")
copyproperty(oOld, oNew, "forecolor")
copyproperty(oOld, oNew, "disabledbackcolor")
...etc etc, any properties you may want to copy. Similarly for code:
copymethod(oOld, oNew, "YourCustomMethod")
copymethod(oOld, oNew, "click")
You may also want a copy member method - if you have December FoxTalk2.0, you can take it from my article there, it's part of the sample code - you only need to write about four lines of code, to extract classlib and class from the member to copy, and then oNew.newobject() it.