From: Rick DeNatale Date: 2010-02-02T01:06:35+09:00 Subject: Re: Inheritance related problem On Mon, Feb 1, 2010 at 10:10 AM, R. Kumar wrote: > Looks good, will give it a try. I feel there's still something "off" in > what i've done, and the question I am asking you, since it requires the > parent to protect itself from (or know of) misbehaviour from a child. Inheritance always introduces coupling between class and superclass. The answer is to cover the code with tests, and run them in order to ensure that the code works correctly when developed, and then to detect any regressions. The other think to watch out for in this particular case, is not to confuse the implementation relationship of subclassing/module inclusion with the containment relationship of windows/widgets. You don't seem to be doing this from what you've posted, but ... -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale