[Lazarus] OOP basics
Marc Weustink
marc.weustink at cuperus.nl
Thu Apr 15 15:31:34 CEST 2010
Graeme Geldenhuys wrote:
> On 15 April 2010 09:25,<stoppok at muenster.de> wrote:
>>
>> Is this global var really neccessary? Normally I delete all those
>> variables in my Delphi projects and create my forms on the fly and
>> everything works fine.
>>
>> Is this really a requirement for the lazarus form designer?
>
> The global variable is not a requirement and can be disabled by
> removing the "Auto create forms" in the Project Options dialog.
>
> Published components and event handlers however are a "lazarus/delphi
> forms designer" requirement - which means everything you drop on a
> form is globally visible. I hate that design.
Yes and no
The lazarus/delphi forms designer uses RTTI for created components. RTTI
is only created for published members of a class so for that they need
to be published.
from a RTTI pov this seems logical since with RTTI you already have all
info available. But from a class design pov it would have been nice if
there was a 2nd way to tell the compiler to generate RTTI for some
non-published members
Marc
More information about the Lazarus
mailing list