[Lazarus] Is it meaningful or possible to change the visibility or the properties and events in a form or datamodule, ie make the private or protected?

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Mar 24 18:54:15 CET 2012

On 23 March 2012 15:55, Frank Church  wrote:
> properly sunk in. It makes me wonder whether I've got my whole
> approach to object orientation and encapsulation with Object Pascal
> wrong or misconceived as a result of that. I guess it is more obvious
> if you start using Lazarus of FPC more on the non visual areas.

Indeed. Using tools like Lazarus IDE and Delphi IDE to build OOP apps
is the worst possible way of doing it. Simply because those two IDE's
rely on streaming via RTTI, which is hugely limited to Published
properties only - thus everything ends up being publicly visible. Yes
the new Delphi now has improved RTTI, but they haven't change the
"everything must have visibility of Published" to work.

I'm a huge believer of true OOP, and that is why I refused to create
fpGUI's Form Designer the way Delphi and Lazarus IDE works. Making
every single thing you drop on a form published visibility is just
wrong! That is a far cry from how OOP software are supposed to be
written. Thus the reason I believe that using Delphi and Lazarus in
such a way, is only good for prototyping applications - not for the
real implementation. fpGUI's form designer makes everything you drop
on a form private by default - you then later make things more visible
(via properties for example) when really needed - this is how OOP
applications are meant to be written.

Other's viewpoints will indefinitely vary from mine, but that will not
change my thoughts on the subject.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list