Compiling Lazarus

Michael Van Canneyt michael.vancanneyt at wisa.be
Mon May 10 05:53:46 EDT 1999




On Fri, 7 May 1999, Cliff Baeseman wrote:

> I am working a major revamping of some of the lazarus code right now.
> 
> Hey got a question for you ? Do you have a copy of the sybil classes?  I
> need to see exactly how TApplication is put together...
> 
> It has been a little while since I really looked at the Delphi
> implementation.
> 
> How does a normal  delphi app go about firing up? I think the project unit
> creates TApplication and passes the forms to be created to it and then
> calls run or something... In lazarus I wish to load the forms to a list in
> TAppplicaiton but how do I actually implement this "cleanly".

Easy,
  TApplication.Addform(Var,type);      // Error if forms already created. see flag
  TApplication.Addform(Var,type);
  TApplication.AddMainForm (Var,type);
  TApplication.CreateForms;            // Sets a flag. Add no longer allowed.
  Tapplication.Run;

This has the advantage that you could implement

Procedure TApplication.CreateForm (Name : String; Var Form : TForm);

So you can recreate a particular form by name whenever you want.

> 
> Delphi must also create the pointers somehow to the internal var
> FormName..?

Why is that needed ? 

> 
> 
> in app.run I will start the gtk engine and load the forms then pass control
> to GTK main
> 
> in app.halt I will just free the forms and give the kill signal to gtk...

Seems like a reasonal approach.

Michael. 






More information about the Lazarus mailing list