> FYI, maybe this is what you meant, but AFAIK you can safely remove the
> Delphi generated form vars from every form unit except your apps main
form.

Yes, that is kinda what I meant.  Its a real pain the only way to assign a
form as the main form is to use Application.CreateForm.  Actually, you can
safely remove the form vars from ALL units, including the main form.  All
you need is the following in your .DPR file:

var
  frmMain: TfrmMain;  // Only unit level var!

begin
  Application.Initialize;
  Application.Title := 'Main application';
  Application.CreateForm(TfrmMain, frmMain);
  Application.Run;
end.

Now all I ask from Borland is another option in the IDE not to generate the
form vars.

Dennis.

----- Original Message -----
From: "Conor Boyd" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, June 16, 2003 11:21 AM
Subject: RE: [DUG]: Non-global Constants in a function


> FYI, maybe this is what you meant, but AFAIK you can safely remove the
> Delphi generated form vars from every form unit except your apps main
form.
>
> [Comprehensive answer on the interface stuff, BTW!]
>
> Cheers,
>
> C.
>
> -----Original Message-----
> From: Dennis Chuah [mailto:[EMAIL PROTECTED]
>
> What you read only applies to const parameters.  I would continue to use
> method level consts and not move them to the unit level.  In fact, I
*never*
> use unit level vars, except for the Delphi generated main form code.
Using
> method level is safer than unit level vars.
>
> [snip]
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to