From: "David Brennan" <[EMAIL PROTECTED]>

> In Delphi 5 it's Tools -> Environment Options, Preferences tab, Auto
Create
> forms check box.
>
> Unfortunately it only stops Delphi from auto creating forms in the project
> file - Delphi still creates the global variables in the form files.

you're right.   but this wasn't the option i was thinking of.

so i finally did track this down - and yes you CAN turn it off.

The trick is to create a blank form, delete the evil instance
declaration stuff:

     var
       Form1: TForm1;

and add this thing to the repository.     AND - check the "New Form"
box which will designate this as the template the IDE should use
when creating a new form.

After this new forms created in the IDE won't have the global instance
variable declared.

> Just to add my 2c worth :-). Every moderately sophisticated Delphi
> application I have worked with has got it's own way of handling form
> creation and referencing. This is usually through some sort custom built
> FormController type object. Using Global variables just doesn't cut it.

I agree.

But I am thankful they didn't create a headless monster like the
"C++ static object creation order" nightmare.

-ns

---------------------------------------------------------------------------
    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"

Reply via email to