[newbie] How to copy class to different name?

squeaker squeaker at dangerous-minds.com
Mon Jul 19 03:02:32 UTC 1999


Bob Arning wrote:
>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.

That method will certainly work.  Thanks.  I was kind of hoping I could do
it all from within Squeak but ....

> HOWEVER, if these classes really are so 
> similar, why not consider making one a 
> subclass of the other?

These are the differentiated bottom-level classes for a little demo
tutorial I'm putting together that illustrates the Abstract Factory
pattern.  They already inherit much from their superclass, "Chips," but
they do some things differently.  A Ford and a Subaru both derive from Car
but they have significant differences both in attributes and behavior.  My
little classes are similar.

I only have a few of these to manage, and I could have done them the BFI
way, but I can forsee needing to cut classes from some sort of template in
the future and I want to find out if there are convenient Squeak ways to do
this.

Thanks!


| John, squeaker at dangerous-minds.com      Squeak?  http://www.squeak.org/ |
| Some minds are dangerous because they're sharp and pointed; others,     |
| because they're heavy and dull; mine, because I know enough to get into |
| trouble but not necessarily out.                                        |


_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com





More information about the Squeak-dev mailing list