The problem of inheritance of visual form. "cannot inherit (parent form). Contains a component that does not support inheritance"

I have a basic form with descendants. The basic form has TElRelDataSource on it (from ElPack v4.00). When I open a child form, I get the error message "cannot inherit (parent form). Contains a component that does not support inheritance." This is due to the fact that the forms of the ancestors are open (there are two of them) in order to avoid the error "ancestor for (parent form)".

Delphi 7 does not support (AFAIK) class completion, but it looks like a standard error message. This is in the index for “Tomes of Delphi: Troubleshooting,” but I don’t have that copy, and I don’t want to spend $ 60 on reading a record like “this is why you should avoid VFI” (pessimistic about the contents of the book). In addition, there are no links on Google or Bing.

This is the code I recently inherited from someone who has long left, and I am the first person to change it since they left. This means that I cannot ask how he created the offensive form.

So, how do I get around this error message?

+3
source share
2 answers

. , , DataSource, : , , ?

TElRelDataSource

, . , , TElRelDataSource.

!

, , TElRelDataSource, . "" "csInheritable". , "csInheritable" ComponentStyle, Delphi . :

  • TElRelDataSource, , TEERRelDataSource NEWER. TElRelDataSource, , , , , csInheritable ComponentStyle!
  • . , TElRelDataSource csInheritable - , , , .
  • HeartWare ; , DATA SOURCE: , DB-Aware, . DataSource , , "if-s" ( RTTI).
  • DataSource TDataModule. , , , .
+5

- FormCreate. () .

+3

Source: https://habr.com/ru/post/1788387/


All Articles