[Pharo-project] Auto create new and initialize methods for new class?
marcus.denker at inria.fr
Fri Jun 15 11:56:29 EDT 2012
On Jun 15, 2012, at 5:48 PM, Conrad Taylor wrote:
> On Fri, Jun 15, 2012 at 8:05 AM, Damien Cassou <damien.cassou at gmail.com> wrote:
> On Fri, Jun 15, 2012 at 4:09 PM, Conrad Taylor <conradwt at gmail.com> wrote:
> > Hi, is there an automated setting which creates default new and initialize
> > methods for a new class?
> why do you need to implement #new so often? It's kind of rare in the
> code I've read.
> Hi, I would like to initialize the objects I create with some reasonable defaults and I don't want to have setters and getters for every instance variable.
#new calls #initialize by default.
So the only thing you need to implement is the #initialize method on your class.
Marcus Denker -- http://marcusdenker.de
More information about the Pharo-dev