Solved

Unknown Identifier error

Posted on 1997-10-21
4
418 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
  • 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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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