[Lazarus] OOP basics

Alexander Klenin klenin at gmail.com
Thu Apr 15 09:49:48 CEST 2010


On Thu, Apr 15, 2010 at 18:25,  <stoppok at muenster.de> wrote:
> On Wed, Apr 14, 2010 at 01:53:55PM +0200, Graeme Geldenhuys wrote:
>> On 14 April 2010 13:09, Kjow  wrote:
>> >
>> > Is it possible?
>>
>> Yes, but there is an alternative too. Very non-OOP, but Lazarus and
>> Delphi enforce it for form creation (and requirement by form
>> designer). In your unit with the TMainForm, there should be a lovely
>> global instance variable called MainForm that you can access from
>> everywhere.
>
> Little bit OT:
>
> 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?

See "When createing new forms, add them to auto-created forms" checkbox
in Project Options.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list