Solved

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

Posted on 1998-10-31
4
2,776 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
  • 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 70 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 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