On 4/28/08, James Carman <[EMAIL PROTECTED]> wrote:
> So, how do you know that everything is good to go in the subclass
>  then?  You really shouldn't be calling a method implemented by the
>  subclass in the superclass' constructor.  In your case, it may work,
>  but in general, it's bad practice.

In general programming with your brain shut down is bad practice. I
see a lot of fear, uncertainty and doubt about calling overridable
methods from a constructor. There is no need to if you engage your
brain.

The biggest problem is that components may not have their final
position in the page yet, so you can't call some methods. Guess what?
That isn't any different from calling those methods in the constructor
in the first place. And it is easily solved by moving that logic to a
delayed execution such as a Model's getObject() method. Which really
provides a better solution in the first place.

Martijn

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to