TDataModule inheritence (IDE problem) lazarus / 13-General ---------------------------------------------------------------------- krisleech · 2007-01-16 17:00 The problem: If you have a class which is not directly decended from TDataModule then the IDE thinks the form is a TForm form and not a TDataModule form. This results in the wrong RTTI parameters being stored and when you reopen the project you get errors about Horizontal/Vertical Offset not being found... Because TDataModule does not have these properties, TForm does. Code: [Select] Tdm1 = class(TDataModule); Tdm2 = class(Tdm1); // IDE thinks this is a TForm The cause, I think: Code: [Select] function TStandardCodeTool.FindFormAncestor(const UpperClassName: string;   var AncestorClassName: string): boolean; var   ClassNode: TCodeTreeNode; begin   Result:=false;   AncestorClassName:='';   if UpperClassName='' then exit;   BuildTree(true);   ClassNode:=FindClassNodeInInterface(UpperClassName,true,false,false);   if (ClassNode=nil) then exit;   // search the ancestor name   MoveCursorToNodeStart(ClassNode);   ReadNextAtom; // read keyword 'class', 'object', 'interface', 'dispinterface'   if UpAtomIs('PACKED') then ReadNextAtom;   ReadNextAtom;   if AtomIsChar('(') then begin     ReadNextAtom;     if AtomIsIdentifier(false) then       AncestorClassName:=GetAtom;   end;   if AncestorClassName='' then     AncestorClassName:='TObject';   Result:=true; end;           This parses the code for the decendant of the class in question looking for TDatamodule or TForm, if neither is found it assumes it is a TForm. Is there any fix or work around for this? ---------------------------------------------------------------------- Vincent Snijders · 2007-01-16 19:15 Not that I know. Please, create a bug report.