[Tutor] creating read only attributes

Alan Gauld alan.gauld at blueyonder.co.uk
Sat Nov 22 15:53:41 EST 2003


> - You're really paranoid about data hiding (some would call
this
> "encapsulation"), and/or write getters and setters for all
object
> attributes. (Java, C++, Delphi)

Actually this is bad practice in Delphi too! You should only do
that for properties and properties should only be useed for
components that will be used from the IDE in a drag n drop
style during design. ie For things you want to expose in the
OBject Inspector tools.

Alan G.
(Who is also a Delphi programmer! :-)





More information about the Tutor mailing list