You need to define AR in MainFm as well (you cannot define it in
UserSettingsUn and expect it to be valid in MainFm as well (even if you use
MainFm in UserSettingsUn).
If you want to only do a define once, you can do all your 'defines' in a
seperate unit (say MyDefs.pas) and include that unit at the top of all your
other units {$include MyDefs.pas}.
----- Original Message -----
From: Mark Howard <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Friday, September 17, 1999 5:29 PM
Subject: [DUG]: Conditional Compiling
> Need some more help please.
>
> I have (for simplicity sake) 2 units UserSettingsUn and MainFm.
>
> In UserSettingsUn I have the following:
>
> unit UserSettingUn;
>
> interface
>
> uses DBTables, DB, Classes, SysUtils, Dialogs, Graphics,
> MainFm, DataMod;
>
> {$DEFINE AR}
> .
> .
> etc
>
> In MainFm I have the following:
>
> procedure TMainForm.FormShow(Sender: TObject);
> begin
> {$IFDEF AR} Showmessage('MainForm before OnStartUp'); {$ENDIF}
> end;
> .
> .
> etc
>
> The message doesn't show.
> The same message placed in the implementation part of UserSettingsUn
> does show.
> What am I missing? This is driving me mad!
>
> Thanks
>
> Mark
>
>
>
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz