Solved

Unknown Identifier error

Posted on 1997-10-21
4
420 Views
Last Modified: 2012-05-04
Hello..
  In my Unit, I can refer to my CheckBox1 field in my TForm1.BitBtn1Click procedure, but when I try to refer to CheckBox1 in another little procedure I just created (ie. procedure do_remove), I get Error 3: Unknown Identifier when I compile. Why? I checked the declarations and CheckBox1 is indeed declared as CheckBox1:TCheckBox. What is happenning here?

Cheers
    Shawn Halfpenny
    drumme59@sprint.ca
0
Comment
Question by:aztec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1348536
Hi

Your procedure Do_Remove must either be part of your form or must refer to your form.
E.g. As part of your form:
Add "procedure Do_Remove;" to your form's public section at the top of your unit.
Then add the code for Do_Remove as follows in the implementation section of your unit:
procedure TForm1.Do_Remove;
begin
    etc.
end;

E.g. Referring to your form:
procedure Do_Remove;
begin
    Form1.CheckBox1.Checked := True;
end;

JB
0
 
LVL 4

Expert Comment

by:StevenB
ID: 1348537
 Exactly.
0
 

Author Comment

by:aztec
ID: 1348538
I like JimBob's response, so go ahead and use that as the answer.

Shawn Halfpenny
0
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 50 total points
ID: 1348539
I guess this is the answer then.

JB

P.S.  Your other question's points went to dvaline, despite your comment that you prefered my answer.  Just thought I'd let you know.  It's not a problem though...   ;-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question