> 2 - A constructor is for constructing - your object should > not be in an incomplete state when the constructor is > finished (such a state that methods such as isVisible can not > be called)
Tha language ensures that the object is "complete" when the constructor exits, but with the exception of immutalbe objects, as a "component" it is not complete. People are e.g. adding to lists at runtime, leading to possible "subcomponent initialiation" later on in the relevant method of a Loop or ListView for instance. It could also be argued for instance that a LoadableDetachableModel is /intentionally/ "incomplete" when the constructor exits. Overriding methods like isVisible() is also a form of "hack" to postpone a property value to a later time (basically the component stops having a "real" property called visible since the setter modifies a variable that the getter does not care about). The desire to have "completeness" after constructor completion also runs afoul with modern ideas like IoC where it is left to an outside agent to complete configuration of a component. However, I agree that the attention of the thread originator should be on the models. - Tor Iver --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
