将 Delphi 7 属性编辑器转换为 Delphi XE2
首先,我从未从头开始编写过属性编辑器,但在 另一个问题。请参阅那里已接受的答案。这是在 Delphi 7 中,现在我已经开始使用 XE2,我必须确保我的属性编辑器与 两者 7 和 XE2 兼容。
它本质上是一个集合编辑器,不同之处在于每个集合项在父表单中都有自己的命名组件。自 7 以来,XE2 中的属性编辑器是否有任何新内容,因为它是一个巨大的版本跳跃?
我不想为不同版本制作我的单元的完整副本。我想在一个单元中维护所有可能的版本。
编辑
看来Delphi XE2具有与Delphi 7相同的属性编辑器,但我面临的问题是,尽管我在包中包含了DesignIDE
,但它找不到任何东西,所以我必须将 ToolsAPI
文件夹添加到我的库路径中。
但是,现在我遇到了一个新问题。
[DCC Fatal Error] ToolsAPI.pas(18): F1026 File not find: 'DockForm.dcu'
我迷失在 BPL 包的整个概念中,并需要其他包等。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DesignIntf、DesignEditors、DesignMenus、DesignWindows 是 DesignIDE.bpl 的一部分,可在 \Embarcadero\RAD_Studio\9.0\lib\win32\release\designide.dcp 中找到。但是没有适用于 64 位的 designide.dcp,这就是为什么在编译引用这些单元的 64 位包时会抛出错误。
DesignIDE 没有 64 位版本,因为它用于设计时包,而设计时包仅为 32 位(请记住 Delphi IDE 仍然只有 32 位)。因此,请始终将设计时包设置为 32 位,而不是 64 位。 :)
迈克
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
DockForm.pas
源代码在 Delphi XE 和 Delphi XE2 中均不可用。您可以尝试这个已接受的答案发布在SO上,适用于Delphi 2010上的类似问题。
据推测,它被编译并包含在一些软件包已随 Delphi XE2 一起分发。
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.