[newbie] How to copy class to different name?
Bob Arning
arning at charm.net
Mon Jul 19 01:22:35 UTC 1999
On Sun, 18 Jul 1999 20:12:2 -0600 "squeaker" <squeaker at dangerous-minds.com> wrote:
>There has to be a squeakier way to do this! I want to copy a class,
>"BudgetChips," to form another class, "GourmetChips." BudgetChips derives
>from another class, "Chips," and has Class and Instance variables and
>methods.
>
>When done, I'll need to go in and do a little customizing but I won't have
>to manually redefine everything via another temporary residence in cut and
>paste hell (I really don't like that place!).
>
>Any ideas appreciated. Also, point me to a FAQ or resource where this is
>already covered and I will be most abject in my apologies for wasting the
>list memebers' time.
John,
1. File out the class BudgetChips.
2. Use a FileList (or your favorite text processor) to edit the fileout changing all references from BudgetChips to GourmetChips.
3. File the resulting changes back in.
HOWEVER, if these classes really are so similar, why not consider making one a subclass of the other?
Cheers,
Bob
More information about the Squeak-dev
mailing list
|