Converting Delphi 7 property editor to Delphi XE2 - delphi

First of all, I have never written a property editor from scratch, but had some help with one in another question. Refer to the accepted answer there. This was in Delphi 7, and now I have started using XE2 and I have to make sure my property editor is compatible with both 7 and XE2.
It's essentially a collection editor, with the difference that each collection item has its own named component in the parent form. Is there anything new about the property editors in XE2 since 7, since it is a huge version jump?
I do NOT want to make a complete copy of my unit for different versions. I want to maintain all possible versions in one unit.
Edit
It appears that Delphi XE2 has the same property editors as Delphi 7, but the issue I was facing was that although I was including DesignIDE in my package, it could not find anything, so I had to add the ToolsAPI folder to my library path.
However, now I have a new issue after this.
[DCC Fatal Error] ToolsAPI.pas(18): F1026 File not found: 'DockForm.dcu'
I'm lost in the whole concept of BPL packages and requiring others, etc.

DesignIntf, DesignEditors, DesignMenus, DesignWindows are part of DesignIDE.bpl and is found in \Embarcadero\RAD_Studio\9.0\lib\win32\release\designide.dcp. But there is no designide.dcp for 64bit which is why it throws an error when compiling a 64bit package that references these units.
There is no 64bit version of DesignIDE because it is for a design time package and design time packages are 32 bit only (remember Delphi IDE is still only 32 bits). So always set your design time package as 32bit, not 64bit. :)
Mike

The DockForm.pas source code is available neither in Delphi XE nor in Delphi XE2.
You may try this accepted answer posted on SO applying to similar issue on Delphi 2010.
Presumably, it is compiled and included within some package already distributed with Delphi XE2.

Related

Is it possible to modify System.Classes.pas in Delphi Rio (10.3.3)

I am upgrading a project from Delphi XE3 to Delphi Rio 10.3.3. The project contains a number of fixes to the VCL and RTL units, made by copying units from the Delphi install into a path inside the project and applying modifications. This still appears to work so long as the correct compiler options are specified in the unit, but this does not seem to work for System.Classes.pas, getting the infamous error:
F2051 Unit AAA was compiled with a different version of BBB
Has anybody been able to modify System.Classes.pas for Delphi Rio, and if so which compiler switches did you use? I note from this answer: https://stackoverflow.com/a/24145450/12683559 that this was broken in XE6 but worked again in XE7.

Error when compiling: 'Vcl.forms.dcu' not found

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.

Delphi 7 Enterprise LibHelp is missing

While compiling Delphi 5 code in Delphi 7 Enterprise Edition, i'm getting below errro
[Fatal Error] MultLang.pas(192): File not found: 'LibHelp.dcu'
I have checked all Delphi7 folders but libhelp.dcu is not present.. any advice???
I have neither LibHelp.pas nor .dcu in my D2007, but it's used in some property editors. So I guess it's design-time stuff, and any code that uses it needs to be in a design-time package requiring designide. Your comment about Proxies.dcu hints in the same direction, so I recommend separating design-time and runtime stuff in two different packages.

Memory leak in TShellChangeThread

I have encountered a problem in which setting AutoRefresh to True in TShellListView leads to memory leaks. This is a known problem, I found a fix for it here: http://www.delphigroups.info/2/bf/292629.html.
My problem is that my application is currently compiled with Delphi 2010 (Rad Studio 7), and that version does not include source for ShellCtrls.pas, which must be modified to implement the fix described above.
I also have a copy of Rad Studio 9 (Delphi XE) on my development machine. This version does include a copy of ShellCtrls.pas. Hoping against hope, is it possible to use the source from XE in 2010? If not, is there any way to get a hold of the of the source for ShellCtrls for Delphi 2010?
Source code is included for all Professional and higher SKUs (although the VCL source included varies based on SKU, the demos usually don't because they want you to want the functionality and therefore upgrade your SKU). If you don't have the source in D2010, you're either looking in the wrong place (it's in the Samples or Demo folder, not the VCL source folder) or you've not installed the demos.
The demos are installed by default in the Users\Public\Documents\ tree; you can find them using the Start Menu for the version of Delphi/RAD Studio you're using.
For example, for Delphi 2007 they're located in C:\Users\Public\Documents\RAD Studio\5.0\Demos on Win7, and the ShellControls folder is specifically in C:\Users\Public\Documents\RAD Studio\5.0\Demos\DelphiWin32\VCLWin32\ShellControls.
In XE2, that changes very little; they're in C:\Users\Public\Documents\RAD Studio\9.0\Samples\Delphi\VCL\ShellControls.
(Just as an FYI thing: On Delphi 7 under WinXP, they're in C:\Program Files\Borland\Delphi7\Demos\ShellControls, so the ShellControls stuff has been around at least that long with source.)

'designide' must be recompiled when installing DWScript on Delphi XE2

I'm running Delphi XE2 w/ update 3.
I've just checked out the read-only branch of DWScript from the svn repository. I try to install dwsLib.dpk from the DelphiXE2 folder but receive the following error:
[DCC Fatal Error] dwsLibRuntime.dpk(30): E2225 Never-build package 'designide' must be recompiled
I tried building dwsLibRuntime.dpk first, but I get an error about missing TdwsUnit component, so that doesn't work, either. I'm not having any luck finding contact info for the author, so am trying here.
Any advice would be greatly appreciated.
The short answer is: DWScript doesn't target Delphi XE2.
Quote:
DWScript lead platform is currently Delphi XE, compatibility with
Delphi 2009 & Delphi 2010 is maintained, but some features may be
restricted (RTTI f.i.).
You must fix the source code if you want it to work with Delphi XE2.
I.am using XE2 with the trunk code and it works fine. I loaded up each dpi (there are two) and built and installed the first. Then compile your code ensuring that you point to the source folders (there are at least three). Failing that I'll post you an innosetup exe that installs it into XE2 that I've made,

Resources