[Lazarus] OOP basics

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Apr 14 13:53:55 CEST 2010


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. Also not very OOP like, all controls on the TMainForm (and
any other form created with Delphi and Lazarus) is published, so they
are globally accessible too.

All this is not what I call good OOP design, but hey, it's RAD convenience. :-/


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/




More information about the Lazarus mailing list