从父级而不是直接从 TIWAppForm 派生 IntraWeb 表单 - IDE 中的错误

发布于 2024-08-20 17:36:10 字数 444 浏览 2 评论 0原文

我的应用程序中有一些源自共同祖先的表单,例如:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

箜明 2024-08-27 17:36:11

我犯了罪,我犯了最大的罪。这个问题与 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文