When I'm trying to inherit TDataModule Delphi treat descendant class like a form giving them 开发者_高级运维properties like font and Client properties. ("property does not exists" exception on a run-time)
TixDataModule = class(TDataModule);
TDM = class(TixDataModule)
end;
What Can I do to make it work?
Make sure that all the inherited components is marked with inherited
rather than object
in the in the dfm.
Toggle "dfm as text" and "dfm as visual" with Alt+F12.
- As TixDatamodule is just a synonym for TDatamodule, you can inherit directly from TDataModule
- If you really want to inherit from TixDataModule, then put TixDataModule in a separate unit, with its own .dfm.
精彩评论