?
Solved

A problem compiling......DFM error...

Posted on 1998-10-31
4
Medium Priority
?
2,847 Views
Last Modified: 2008-03-06
 I have an application that has 2 forms, each with its own .pas file.  This was working fine for quite some time, but I made a change a while back to add a 3rd form.  Now when I compile this, I get the error message saying "Error (0) File Not Found 'Unit1.DFM'
I do not have a Unit1.pas or Unit1.dcu, I think that may have been the old name, and it was so long ago I don't remember what I did to this, but I can't get past this error.  I tried renaming each of the current DFM's (3 of them) to unit1.dfm and recompiled to see if I could solve the problem (just guessing/trial and error), but that didn't work.  Can anyone help on this?
               Thanks  
0
Comment
Question by:jexd99
[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
 

Author Comment

by:jexd99
ID: 1345208
Forgot to mention ..... Delphi 3.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1345209
Do you mind sending me this project to me??? Without the EXE file only the sources and dfm files... No DCUs and DOFs and so on.... Send me all the DFMs and PASes

Cheers,
Viktor
E-mail viktor@megsinet.net
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 280 total points
ID: 1345210
I have noticed that there is a bug in Delphi that sometimes results in the name of the unit and the name included in the uses clause messed up. This always seems to happen during the process of saving the form after you have already saved it as unit1.pas.

Look in your uses clauses - do you see unit1 in it? If so change it to the correct name of the unit. (there will be a .PAS and .DFM file that don't appear in the uses clause...)

If you are going to try renaming them then make sure that you rename both the .DFM and the .PAS files in unison.

Cheers,

Raymond.

0
 

Author Comment

by:jexd99
ID: 1345211
Cha-ching! That took care of it. :-)

It had the old unit name listed (unit1.pas), as you mentioned, and I just removed it to make this work.  This does appear to be a small bug in D3. I'll have to be careful how I rename/save the units from now on, and make sure I don't get caught by this one
again.  Thanks a bunch.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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