开发者

Derive IntraWeb forms from parent and not TIWAppForm directly - error in IDE

开发者 https://www.devze.com 2022-12-19 09:44 出处:网络
I have forms in my application that I derive from a common ancestor, like: TAtFormBaseIW = class( TIWAppForm )

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 cre开发者_如何学Goated 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消