What you should probally do is not comment out the whole button's code - I
think you have probally done this.
{$Ifdef XYZ}
procedure Tform1.Button1Click(sender);
begin
{ do something }
end;
{$ENDIF}
because in the class declaration there is a method declared as this
procedure Button1Click(sender);
What I would do is just this
procedure Tform1.Button1Click(sender);
begin
{$Ifdef XYZ}
{ do something }
{$ENDIF}
end;
This way you are not having to worry about messing up the code that Delphi
writes.
Chris
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Mark Howard
Sent: Monday, August 30, 1999 10:16 AM
To: Multiple recipients of list delphi
Subject: [DUG]: Invalid Property Value
Hi guys
Am trying to use conditional compiler directives for the first time.
The conditional bit provides for a menuitem which opens a TNotebook
page, report start and finish dates etc are set. A Run button
(AcctRepBtn) then calls a quick report.
This all works fine until I try to put these bits inside some
conditional compiler codes.
In a UserSettings unit I define {$DEFINE AcctRep}
In the Mainform I have a {$IFDEF AcctRep} and {$ENDIF} around both the
procedure declarations and those procedures in the Implementation part.
What I get - on compilation is "Exception EreadError. Error reading
AcctRepBtn.Onclick:Invalid Property.
Can sombody please give me a pointer to what I have overlooked or what
sort of situation is likely to give this error.
TIA
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