[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?

Frank Church vfclists at gmail.com
Fri Mar 23 14:55:03 CET 2012


On 23 March 2012 13:28,  <michael.vancanneyt at wisa.be> wrote:
>
>
> On Fri, 23 Mar 2012, Frank Church wrote:
>
>> 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?
>
>
> Which properties and events ? Can you give an example ?
>
>
>>
>> Of late when I look the definition of a form, it all seems so odd to
>> me that properties, objects etc which are not meant to be accessible
>> to external modules are automatically visible.
>
>
> Such as ?
>
> And visible where ? In the code tools, or in the Object Inspector ?
>
> Michael.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


I am referring more to the source code itself. After adding lots of
forms, data modules etc, I look at a datamodule or a form (more
relevant with datamodules) and ask myself "What does this module do?"
and find myself staring at procedure after procedure in a bit of
confusion. I'd prefer to look only at the public section and say, Oh,
this is what it does for the program's other modules. Whatever isn't
there is not relevant to the rest of the application.

I understand that it comes from a Delphi legacy as RAD tool dating
from a time when the principles underlying object orientation had not
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.


-- 
Frank Church

=======================
http://devblog.brahmancreations.com




More information about the Lazarus mailing list