GExpert的替换组件专家不会替换表单文件(* .dfm)中的文本 [英] GExpert's Replace Components Expert doesn't replace the text in the form file (*.dfm)
问题描述
我正在使用Delphi 2010和GExperts稳定版1.35
I am using Delphi 2010 and GExperts stable release 1.35
我正在测试替换组件专家。
I am testing the "Replace Components" expert.
我添加一个主表单和一个辅助表单。每个都有三个TEdit。
I add a main form and a secondary form. Each has three TEdits on it.
我使用Replace Components Expert将所有TEdit替换为TRzEdit。我检查了替换项目所有形式上的所有组件。
I use the Replace Components Expert to replace all TEdits with TRzEdit. I Check the Replace all components on all forms of the project.
它起作用了,它将全部替换掉。但是,它对DFM文件没有任何作用。我该如何替换那些实例。
It works, it replaces them all. However, it doesn't do anything to the DFM file. How do i make it replace those instances.
如果我保存,编译或重建,则会出错。
If i save, compile, or rebuild, i get errors.
如果我尝试在替换后以文本形式查看表单,则会出错。
If i try to view the form as text after replacing, i get errors.
有人可以向我解释完成此工作的步骤吗?
Can someone explain to me the steps to make this work?
谢谢
推荐答案
在尝试复制Touch属性时,您可能会遇到此错误从旧的组件到新的组件,但是有一种解决方法,您可以轻松测试:
http://tech.groups.yahoo.com/group/GExpertsDiscuss/message/3994
You might be running into this bug while trying to copy the Touch property from the old to the new component, but it has a workaround you can fairly easily test: http://tech.groups.yahoo.com/group/GExpertsDiscuss/message/3994
详细信息:
Delphi 2010和XE中存在一个限制/错误,如果您将
Component.Touch属性从一个组件分配给另一个组件并销毁
原始组件,新组件已损坏(不是
像组件/接口引用一样,它们在可以自动更正
本身或对其进行引用计数。)
There is a limitation/bug in Delphi 2010 and XE where if you assign a Component.Touch property from one component to another and destroy the original component that the new component becomes corrupt (it isn't like component/interface references, where they either auto-correct themselves or are reference counted).
目前,您可以从以下位置分配双向替换组件
属性图TPanel.Touch到TGroupBox.Touch(在您的特定情况下,使用两个要替换的组件)被标记为
a禁用属性映射,并且可以解决此问题。我们的下一个版本
将不再尝试分配该属性。
For the moment, you can assign a bi-directional replace component property map from TPanel.Touch to TGroupBox.Touch (use the two components being replaced in your specific case) that is marked as a disabled property map, and that will work around this problem. Our next release will not try to assign that property any longer.
GExperts 1.36 现在也可用,其中包括针对此问题的解决方法。解决方法已经在GExperts版本控制系统中进行了测试,并且已经进行了数周的测试。
GExperts 1.36 is also now available and includes a workaround for this issue. The workaround has been in the GExperts version control system and in testing for several weeks already.
这篇关于GExpert的替换组件专家不会替换表单文件(* .dfm)中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!