I am migrating a project from Delphi 7 to Delphi XE2.
I am still working on it but when I run the project in Delphi XE2, it stopped in a function which calls a unit from a third party component. This unit was not initialized so I expected this error.
However, when I compiled the project in Delphi 7 and I got to the part where it should break like in XE2, it works normally. Therefore, I proceed to inspect this unit in the project, when i try to compile now, with the unit opened in the IDE. it show this message.
Field FormPropiedadesElemento.SpinVector does not have a corresponding component. Remove the declaration?
After I click "NO", the project runs but now stops in the same part as the Delphi XE2 project.
This problem only happens in Delphi 7 when I am seeing the code from this unit.
Any idea what could it be or how to solve it?
Usually, this happens because you don't have the appropriate design-time package for that component installed in the IDE.
What the error means is that you have a field in the IDE-managed part of your form declaration that does not have a corresponding component in the dfm file.
Related
I'm using Delphi 10.3.3. Today, I added a TActionManager to a form containing a TCheckList and set a few actions.
When I tried to compile, the IDE insisted on adding IDETheme.ActnCtrls to my Uses list, then failed to compile because it couldn't find the file.
I've been using Delphi since Borland Pascal, and this one is new to me.
What can I do? I've tried deleting, building instead of compiling, starting a new unit, a new project, restarting the IDE and starting a new project.
John Treder
Known issue in 10.3.3:
RSP-27035: [dcc32 Fatal Error] F2613 Unit 'IDETheme.ActnCtrls' not found.
Marco Cantu said:
Unfortunately there is a an incorrect dependency in the IDE. If you close the file unit from the IDE, and remove that uses statement with another editor, it should compile (from the IDE) and work correctly. We are looking into a solution
Patrick Premartin said:
il you add an empty unit named IDETheme.ActnCtrls to the project, you probably can compile without changing source file outside Delphi
A patch was released for the issue:
#30903: RAD Studio 10.3.3 IDE and VCL Patch
I worked on my school IT project from home, on a newer Delphi (RAD Studio 10 Seattle). Now when I copied my program to work on it at school (Delphi 2010), it got an error when compiling Vcl.Forms.Dcu not found.
I have looked at other StackOverflow questions and my Unit Output Library is correctly set to $(BDSCOMMONDIR)\Dcp, so I do not know what is the problem.
The VCL unit prefixing was added in XE2 to differentiate between same-named units in the VCL and (newly added) FMX frameworks. Removing the Vcl. prefix will correct the error.
Unit Scope Names were introduced in XE2, so the Vcl.Forms unit does not exist in Delphi 2010, it was still known as Forms instead.
The correct solution in this situation is to refer to the Forms unit in your code as simply Forms, not as Vcl.Forms. In your Seattle project options, make sure that Vcl is listed in the compiler's Unit scope names configuation field.
This way, when compiling the code, D2010 will look for Forms.dcu only, and Seattle will look for Vcl.Forms.dcu when it cannot find Forms.dcu.
I found a workaround for a bug (QC#25702) in the Delphi VCL unit Grids.pas, so I copied that file to my project's source folder, added it to the project and changed a few lines of code. That was with Delphi 2007, and everything worked as expected.
Now, with Delphi XE2, the project no longer compiles. It complains about incompatible types "TCustomGrid" and "TdzVirtualStringGrid" (which is a descendant of TCustomGrid). It turns out that one unit refers to TCustomGrid as declared in my copy of Grids.pas, the other to TCustomGrid as declared in Vcl.Grids.pas. This happens even though both units have "Grids" in their uses clause (rather than Vcl.Grids). Any idea how I could solve this?
Your problem is that you are including the Delphi 2007 Grids unit in your XE2 project. That won't work at all. What you need to do to modify an RTL/VCL unit in this way is as follows:
Start with the source code for the unit supplied with the Delphi version that you are using. In this case start with Vcl.Grids.pas supplied with XE2.
Make a copy of that unit inside your project directory, and add that unit to your project.
Make any modifications to the implementation section of the copied unit.
The GUI for my company's main product was written in Delphi in the late '90's, and has been updated to Delphi 2007. I'm working with a group to update the Delphi 2007 to XE4.
We still use a number of components from ADL VCL (similar to DevExpress, but now defunct), but have not installed the entire package. Rather, we have the files we need located in a folder seperate from our project folder, and have the path to these files specified in:
Tools-Options-Library-browsing path
and
Project-Options-search path
When I open main, I get the error:
"TADLAboutBox not found. Ignore the error and continue?"
The unit "ADLAbout" that defines "ADLAboutBox" is declared in the uses clause in main.
Moreover, our project compiles just fine.
How can I get rid of these messages? What might be wrong?
Thanks very much for your advice.
The component is not installed in the IDE, so when you open a form that uses that component you get an error.
But the source to the component can be found so when you compile it will do that without problems.
To get rid of the error you must install the component in the IDE.
ADL VCL is not available for XE4, since it was discontinued some time before XE4 was released. If you have the ADL source code, and have ported it to XE4, then it's plausible that you may have some success.
The error message you describe is symptomatic of not having the design-time packages for the components installed. You'll need to build and install design-time packages for any components that you want to interact with at design-time.
I am using an ActiveX component in my projects. I can add this component to Visual Studio 2010, 2008, Delphi XE2, Visual Basic 6.0, but I cannot import this into Delphi versions 5, 6 or 7.
This is the activex file in my ftp server: Active X File
OK, I was brave enough to download and register this OCX and try to replicate what you did. And yes I found the same behaviour as your reported.
So, I looked at the imported type library unit in XE2. Remember that in XE2 a component appears on the palette. At the bottom of the unit is this code:
procedure Register;
begin
RegisterComponents(dtlOcxPage, [TTAK_Control]);
end;
This code registers the component in the palette and it is missing when the OCX is imported in Delphi 6, the only old Delphi I have to hand. Indeed the entire TTAK_Control component is missing from the import unit. Sometimes the import process fails.
So I simply took the imported type library file from XE2 and copied it over the top of the equivalent unit in D6. That's the unit named TAK_ControlBoard_TLB. When I compiled in D6 there was a compiler error because UIntPtr was not recognised. Replace that with Cardinal in D6. At that point the compilation succeeds and the component appears on the palette.
Now, when I attempt to add it to a form an OLE error is produced, but I can't really help with that since I know nothing about the component. Note that this error occurs in both XE2 and D6.