From: David Alan Black Date: 2002-07-05T10:57:55+09:00 Subject: Re: self_parent Hi -- On Fri, 5 Jul 2002, Tom Sawyer wrote: > what if it had a method argument to identify the class name: > > self_ancestor(Class) > > or the like? in this way you could move as far up as you needed without > breaking code under refactorization. of course, precedence would have to > be given to the first match in the case of a parent creating an instance > of itself. If you keep at it, you might come full circle to the idea of passing self as an argument :-) That's the thing -- I think as you examine the problem with this idiom, you'll end up finding other, more economical ways to do the same kinds of things. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav