从父级而不是直接从 TIWAppForm 派生 IntraWeb 表单 - IDE 中的错误
我的应用程序中有一些源自共同祖先的表单,例如:
TAtFormBaseIW = class( TIWAppForm ) 和 TAtFormExplorerIW = class( TAtFormBaseIW )
这适用于某些表单,但不适用于其他表单。
让我大胆猜测一下:它似乎适用于 IW 10 之前在 Delphi 中创建的所有表单,但不适用于我使用 IW 10 创建的表单。较新的表单会发生什么情况:HWenever 我想将它们加载到 IDE 中,它们被解释为 win32 表单,一些属性被忽略(所有典型的 win32 属性,例如 ClientWidth),并且我被告知不能将 IW 组件放在这些表单上。
使它们成为 TIWAppForm 的直接后代,保存它们并使用普通的文本编辑器将它们改回原样。重新编译后,它们在浏览器中显示得很好,但在 IDE 中却显示不出来。
知道发生了什么吗?
I have forms in my application that I derive from a common ancestor, like:
TAtFormBaseIW = class( TIWAppForm )
and
TAtFormExplorerIW = class( TAtFormBaseIW )
This works for certain forms, but not for others.
Let me make a wild guess: it seems to work for all forms that where created in Delphi prior to IW 10, but not for forms I created with IW 10. What happens with newer forms: HWenever I want to load them into the IDE, they are interpreted as win32 forms, some properties are ignored (all typical win32 properties such as ClientWidth), and I am told that I cannot put IW components on these forms.
Making them direct descendants of TIWAppForm, saving them and using a normal text editor to change them back works. After a recompile they show up fine in the browser, but never in the IDE.
Any idea of what is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我犯了罪,我犯了最大的罪。这个问题与 IntraWeb 无关,而是与将派生表单添加到项目中的方式有关。
在向项目添加新表单后,我不应该只是将 TIWAppForm 更改为 TAtFormBaseIW,而是应该执行以下操作:
在 IDE
文件/新建/其他/可继承项
中选择,然后选择要从中派生表单的基本表单。
如果要将现有表单转换为派生形式,还可以将 dfm 文件中的前导关键字 object 更改为 inherited。
您可以在此处阅读相关内容。
Mea culpa, mea maxima culpa. This problem has nothing to do with IntraWeb, but with the way a derived form should be added to the project.
Instead of just changing TIWAppForm to TAtFormBaseIW, after having added a new form to the project, I should do this:
Select in the IDE
File / New / Other / Inheritable Items
and then the base form you want to derive your form from.
If you want to turn an existing form into a derivate, also change the leading key word object in the dfm file to inherited.
You can read about this here.