I am new to delphi,
when opening one unit I get this error message,
Error reading cp_port.BaudRate: Property BaudRate does not exist. Ignore the error and continue?
and when I try to run the program, some components that added is gone, I mean, I need to install it again, but no luck, still my program can't start?
how can i solve this?
I tried to Google it but I can't find the answer. help me. thanks
There is a mismatch between the .dfm file and the component code for the object named cp_port. The version of the component used to create the .dfm file includes a property named BaudRate. That property does not exist in the version of the component that is trying to read the .dfm file when you encounter the error.
The solution to such an error is to make sure that you use the same version of the component as was used to make the .dfm file.
Related
I am migrating my Delphi 7 code to Delphi XE4.
In one of the files in Delphi 7, I found xercesxmldom in the uses. I found that its dcu is placed in C:\Program Files\Borland\Delphi7\Lib.
When I tried to compile this file in Delphi XE4 environment, I got error xercesxmldom.dcu not found. I searched my entire C drive but it was not there anywhere.
I thought it is deprecated now. So I commented it out as it was nowhere used in the file and project compiled successfully.
Now when I try to open dfm file by double clicking on it, I get error No matching Dom Vendor: "XercesXML".
When pressed OK, dfm opens fine. I don't know why am I getting this error message?
The error you are seeing is because, although you have stopped referring to the xercesxmldom unit, your code still sets the DOM vendor to XercesXML. You'll need to choose a different DOM vendor. You need to locate everywhere in your program where you assign to the DOMVendor property and modify it accordingly.
I have a set of components in split runtime/designtime packages for Delphi XE2. I've had these for a long time and have had no problems like what I'm having now. I added a new basic control called TJDWebcam. All was fine until I decided to change the type name to TJDWebcamView. I did a find/replace in the main source unit where I have this class, and made some other changes, also in the design-time package's registration unit.
The problem is that now when I build the run-time package, I get a message saying that it requires its self (It requires a package JDComponents which is exactly the same package). I've uninstalled the package, and tried to re-build, but same error.
Here's the specific message I'm getting...
Add JDComponents.
JDComponents contains implicit unit(s) uPickFolder, JDCommon,
JD.VSample, JD.VFrames, NativeJpg.
...and every unit in the package which are OK to be there. The problem didn't start until I changed this control's type name and went to re-compile.
Now if I ignore that message and hit 'Cancel' everything seems to install fine, despite the warning that it "might cause errors".
For what reasons might it be doing this? And how to go about fixing it? I'd hate to have to post my entire component library to be debugged.
PS - My library makes use of the delphi version suffix (160 for XE2) and my own version suffix (2), so the package names actually read JDComponents.160.bpl.2 and DCLJDComponents.160.bpl.2.
UPDATE
I managed to get it installed, please see my answer below.
After doing these following steps, I managed to get it re-built successfully:
Uninstalled the package
Deleted all DCU's, package, and anything compiled
Restarted the PC
Re-build everything
So the source of the problem is still unknown, but most likely somewhere in a compiled file (DCU or the package), it was still referring to this old type name from before it got changed. When the compiler came across this, it got confused and told me I had to include this other package, which is actually the same package.
Most of the units I work on rely on a Data Module. One of the most annoying things I come accross is an error message telling me
Module X references another module and cannot be saved until Module Y is loaded.
Now, I'm sure there is a very good reason why CheckNoFixups raises this error while trying to WriteRootStream, and fails to save what is in effect a Text file (and hopefully this isn't followed by Catastrophic Failure where I must then restart the IDE while still unable to save my work.) but what is the good reason?
Why am I unable to click save without opening anothing text file containing various functions and objects much like any other unit? whats so special about a DataModule that means I can't save the source I'm working on until it's open, why aren't the 45 other units in the uses clause so important they must be open?
EDIT:
It's Delphi 2007
the Declaration of the DataModule is :
unit DataMD;
TRepDataMod = class(TDataModule)
...
var
RepDataMod: TRepDataMod;
If the DataModule is not part of the opened project the data aware objects in your form that reference the DataModule, cannot verify their reference and I think therefore the message comes up.
I only seen this message when I was porting an older project to a new Delphi version or were migrating to a new set of database components. In normal circumstances I haven't encountered this message.
In earlier versions I haven't seen the message and the form/unit could be saved, but the references that were in your dfm were magicly deleted.
I have the same issue (Delphi 7).
I have an imagelist on a datamodule for usage throughout the whole application. It happens after a compile, if there is an syntax error. The IDE opens the (pas) file and I can correct the error.
But trying to save the file shows that message ("Module 'XXX' links to module 'YYY' which cannot be found in the current project. Do you whish to remove/redirect the links to another module?"). XXX is the file itself and YYY is the datamodule. The datamodule is included in the project and answering "Yes" to that question would remove all links in the dfm file.
So the only solution is pressing "No", which basically saves the pas file and close the file in the - this time pressing "No" to the question if the file should be saved (the pas is in fact already saved).
I have allready tried various workarounds butstill struggling.
Module X references another module and cannot be saved until Module Y is loaded.
Just look over X.dfm (X.fmx) for "Y" entries. What to do with them, it's your choise.
Make sure DataModule is part of the project. Not enough just to include on search-path or enter into dpr-file manually. Go through IDE and add the DataModule to the project.
Also make sure the DataModule dfm-resource has the same name as the unit.
While compling Delphi application there is an error
"file not found "htmlview.dcu".
The errror is not on my system ,but someone else's.
I checked it my system and its there in " C:\Program Files\PBear\Thtml\package".
Whats the remedy if there is an error
"file not found "htmlview.dcu".
Generally, if it tells you it can't find a DCU file, what it really means is that it can't find the unit at all, i.e. neither the source nor the DCU. Make sure the other person has htmlview.pas, and that they have it either included in the DPR or in a folder that's either on the Library Path for their Delphi installation or the Search Path for the project that needs it.
If you found the error on someone else's system, but not yours, and found the missing .DCU on your own system, you need to give them the .DCU from your system.
If you think about the error message before posting here, it would be pretty clear I'd think. "File not found " very clearly tells you it can't find the file , so you need to give it to them. Doesn't it?
I'm trying to compile a Delphi 7 project that I've inherited, and I'm getting this error:
[Error] WARNING. Duplicate resource(s):
[Error] Type 2 (BITMAP), ID EDIT:
[Error] File C:[path shortened]\common\CRGrid.res resource kept; file c:\common\raptree.RES resource discarded.
It says warning, but it's actually an error - compilation does not complete.
It looks like two components - CRGrid and RapTree - are colliding somehow. Does anyone have any ideas on how to fix this?
Other than removing one of components from the project, of course.
Try firing up your resource editor (I'm pretty sure Delphi comes with one) and open the files. Check what bitmap resources are in the two, see which can be the duplicate.
If you need to keep both resources, you need to renumber one of them.
try this: Fixing the "Duplicate resource" error
You'll need to go into the components and rename one of the resources and then update the component code to use the new name. It's a pain, but that's all you can do.
I know this is an old thread, but still worth an update for anyone maintaining old code:
I had this problem and it was due to images in RES files being named the same thing. Delphi7 has an Image Editor which can open RES files. Simply open both RES files involved in the Duplicate Resource error, and rename one of the offending duplicate resources. Save the RES files and recompile. Has worked for me twice recently when I replaced an old component in a Delphi 7 app with a (slightly) newer one.