Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unit bypassrd and old dcu run

Status
Not open for further replies.

MLNorton

Programmer
Nov 15, 2009
134
US
I have a Delphi 7 program with several Forms. A procedure in a Form calls another Form. This has been working until I had to change the called Form to a different one. Now the program skips the entire Unit that contains the calling Form and apparently is finding an old dcu file and running it since the resulting Form is the old one and not the new one. The following code might help:

Unit NewMember
……..
……..
Application.CreateForm(TForm_NewEntry, Form_NewEntry);
Form_NewEntry.ShowModal;

Previously the called Form was “Form_NewData” and “Form_NewEntry is the desired Form as shown in the Unit. Form_NewData is displayed rather than the desired Form_NewEntry. Unit NewMember is never run.

How can this be resolved?
 
What's specified in the DPR?

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
Not sure if this will help fix your problem, but I have a little trick for deleting temporary files. First of all I never tell delphi to save any dcu files or anything in any other place (by default in the same folder as the unit). I have a batch file in every folder which looks like this:

Code:
@Echo off
echo Deleting temporary files...
del *.~*
del *.dcu
del *.map
del *.ddp
del *.dti
del *.dof
del *.cfg
del *.clx
del *.dsk
del *.dsm
echo Complete.

Run this batch file any time you want to make sure all temporary files are deleted. It's a good cleanup routine every now and then. I still haven't had the time to create a project which does this work for me, but that might come soon.

JD Solutions
 
GExperts has a similar utility to keep your folders clean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top