Solved

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

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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