From: Damphyr Date: 2005-09-29T17:04:27+09:00 Subject: Re: Class Methods and derivation Robert Klemme wrote: > Damphyr wrote: > >>>Guy, you were too fast again! :-) So I cut out my similar example >>>and just add what would have been my explanation: >>> >>>The trick is not to do Test.new but to use just new (calls self.new >>>which is DerivedTest in sub class). >>> >>>Kind regards >>> >>> robert >> >>I can always rely on Guy for a fast answer :). > > > :-)) > > >>Simple, when not very obvious. I guess I had to keep in mind that new >>is private and for private methods self. is implicit. > > > new is *not* private - initialize is. How else could you do Foo.new? new > is a method of the class intance and initialize is an instance method. Forget even that I said it. It was too late after too many beers :) V.- -- http://www.braveworld.net/riva ____________________________________________________________________ http://www.freemail.gr - ������ �������� ������������ ������������. http://www.freemail.gr - free email service for the Greek-speaking.