Auto Generation of Getters/Setters

Mark A. Schwenk mas at wellthot.com
Thu Dec 2 21:24:04 UTC 1999


Stephen Travis Pope wrote:
> 
> There's a basic access method generator in the STP12 goodies at ftp://ftp.create.ucsb.edu/pub/Squeak/goodies/STP12/STP12/System/CodeGen.st.
> 
> It implements the method for the message "publish" that can be sent to a class. It'd be pretty easy to add it to the class list menu in the browser.
> 
> --
> stp
> 
> Stephen Travis Pope  --  http://www.create.ucsb.edu/~stp
> stp at expertcity.com   --  stp9 at cornell.edu

I've used this for about six months. It was very easy to install and to add to the class list menu. In spite of it being easy for anyone to add to their own system, I think it is a good candidate for inclusion in the base image. 

There is one change to its behavior that I have wished for but haven't taken the time to implement: to not overwrite existing methods. That way if I have tweaked one of the accessors, it wouldn't be erased when I added the next instance variable and regenerated the accessors.

Thanks for a time-saving goodie!

-Mark Schwenk
 WellThot Inc.





More information about the Squeak-dev mailing list