[Lazarus] OOP basics - 2

Paul Ishenin webpirat at mail.ru
Wed Apr 14 15:55:58 CEST 2010


Why class and init are in the different units?
>    TForm1 = class(TForm)
>      procedure FormCreate(Sender: TObject);
>    private
>      { private declarations }
>    public
>      { public declarations }
>      x,y: integer;
>      tester1: TTest;
>    end;
>    
...
> procedure init(a,b: integer; MainForm: TForm1);
>    
Why not to move init to the TForm1?

Such problems are often happen when either you don't own a piece of code 
and therefore can't modify it or your code is designed bad.

Best regards,
Paul Ishenin.




More information about the Lazarus mailing list